I have the situation where I’m initializing my model in DatabaseInitializer() for EF 4.1 and get this annoying error "Validation failed for one or more entities. See 'EntityValidationErrors' property...
is there “elegant” way to give specific property a default value ? Maybe by DataAnnotations, something like :...
Does the virtual keyword has an effect when used on the properties in EF Code First?. Can someone describe all of its ramifications in different situations? For instance, I...
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by...
I’m experimenting with this code-first approach, but I’m find out now that a property of type System.Decimal gets mapped to a sql column of type decimal(18, 0). How do...
I’m using Entity Framework 5.0 Code First; public class Entity { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public string EntityId { get; set;} public int FirstColumn { get; set;} public int SecondColumn {...
I have this scenario: public class Member { public int MemberID { get; set; } public string FirstName { get; set; } public string LastName { get; set; }...
My understanding is that the [NotMapped] attribute is not available until EF 5 which is currently in CTP so we cannot use it in production. How can I mark...
I’ve been wrestling with this for a while and can’t quite figure out what’s happening. I have a Card entity which contains Sides (usually 2) – and both Cards...
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only...