update franchiseeTable set franchiseeTable .postal_code_territory_id= a.postal_code_territory_id from franchisee_zips z inner join postal_code_territory a on z.pid=a.tdg_pid
One of the issues with using Entity Framework is that you may want some special annotation but you don't want to use a DTO or other object outside of EF. One way to afford you the opportunity to Annotate on the original EF model is to extend with a partial class of meta data. In your Data Models folder (or really anywhere in your data project) you would add a class (Partial Classes) that would contain empty pointers to your data classes - (in my tt files I have a company class and a systemUser class which represent models from the tables in my database): PartialClasses.cs using System.ComponentModel.DataAnnotations; namespace MySite.Data { [MetadataType(typeof(systemUsersMetadata))] public partial class systemUser { } [MetadataType(typeof(companyMetadata))] public partial class company { } } Once you have this setup you can begin to annotate! Create a system...
I am really loving the data entity in my new projects but have come across a couple of issues already. Tonight I learned about using a field that is not a part of your database and not in the entity but is a consolidation field from a group. Once I found some good samples it worked incredibly well and I had a little summary grid on the page in just a couple of minutes. So here is what I did using (myEntityName context = new myEntityName()) { //First I declared a couple of variables because I was looking at data between specific dates DateTime startdate = DateTime.Parse("2014-02-01"); DateTime enddate = DateTime.Parse("2014-02-01"); var dbRecords = (from c in context.myTableName where (c.MemberStartDate >= startdate && c.MemberStart...
Comments