public void Create(Eggs eggs) { using (var context = new NurseryContext()) { context.Eggs.Add(eggs); context.SaveChanges(); } }
public void Create(AntType type) { using (var context = new NurseryContext()) { context.AntTypes.Add(type); context.SaveChanges(); } }
public IReadOnlyCollection <Eggs> Get() { using (var context = new NurseryContext()) return(context.Eggs.ToList()); }
public IReadOnlyCollection <AntType> Get() { using (var context = new NurseryContext()) return(context.AntTypes.ToList()); }