public static EmployeeManager Create(IdentityFactoryOptions <EmployeeManager> options, IOwinContext context) { AnimalHomesContext db = context.Get <AnimalHomesContext>(); EmployeeManager manager = new EmployeeManager(new UserStore <Employee>(db)); return(manager); }
public List <House> GetAllHouses() { using (var ctx = new AnimalHomesContext()) { List <House> allHouses = ctx.Houses.Include(x => x.Animals).ToList(); ctx.SaveChanges(); return(allHouses); } }