I'm trying to do something which should be relatively easy, but i just dont know how to construct it.
I have a Generated Entity which I'd like to override by adding a Linq Where statement.
Herewith the partial for the Context :
public partial class MyEntities: DbContext
{
public MyEntities()
: base("name=MyEntities")
{
}
public DbSet<Assignee> Assignees { get; set; }
}
I've created a new partial of MyEntities and tried the following
public override DbSet<Assignee> Assignees
{
get
{
return this.Assignees.Where(z => z.IsActive == true);
}
set;
}
but this throws an ambiguity error (which is obvious).
How can I accomplish this?
Thanks