I will like to know that is there a way to exclude some fields from the database? For eg:
public class Employee {     public int Id { get; set; }     public string Name { get; set; }     public string FatherName { get; set; }      public bool IsMale { get; set; }     public bool IsMarried { get; set; }      public string AddressAs { get; set; } }   How can I exclude the AddressAs field from the database?
for future reference: you can use data annotations MSDN EF - Code First Data Annotations
[NotMapped]         public string AddressAs { get; set; } 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With