You can also mark your property with [NotMapped]
attribute or use Ignore
method from fluent API.
Property
public class EntityName
{
[NotMapped]
private string PropertyName { get; }
}
Fluent API
public class Entities : DbContext
{
public DbSet<EntityType> Users { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
// Some database configuration
modelBuilder.Entity<EntityType>()
.Ignore(i => i.PropertyName);
}
}