I have a State
model class:
public class State
{
public int Id { get; set; }
public string Name { get; set; }
public int CountryId { get; set; }
public virtual Country Country { get; set; }
}
And I am trying to create a Repository
:
Scaffold Repository State
I've got in generated file:
public IQueryable<State> All
{
get { return context.State; }
}
instead of context.StateS
.
Property
public DbSet<State> States { get; set; }
successfully has been added to the DbContext
class.
I have no overrided OnModelCreating
method.
Sometimes I mention such problem in different projects but can not find a reason.