public void removeAll() { using (var ctx = new SaprSimDbContext()) { ctx.statistics.RemoveRange(ctx.statistics); } }
public void removeAll() { using (var ctx = new SaprSimDbContext()) { ctx.models.RemoveRange(ctx.models); } }
public AbstractStatiscticsBean findById(int id) { using (var ctx = new SaprSimDbContext()) { return(ctx.statistics.Where(s => s.id == id).FirstOrDefault()); } }
public void removeById(int id) { using (var ctx = new SaprSimDbContext()) { AbstractStatiscticsBean stat = ctx.statistics.Where(s => s.id == id).FirstOrDefault(); ctx.statistics.Remove(stat); } }
public void save(AbstractStatiscticsBean value) { using (var ctx = new SaprSimDbContext()) { ctx.statistics.Add(value); ctx.SaveChanges(); } }
public void removeById(int id) { using (var ctx = new SaprSimDbContext()) { Model model = ctx.models.Where(s => s.id == id).FirstOrDefault(); ctx.models.Remove(model); } }
public void save(Model model) { using (var ctx = new SaprSimDbContext()) { ctx.models.Add(model); ctx.SaveChanges(); } }
public Model findById(int id) { using (var ctx = new SaprSimDbContext()) { return(ctx.models .Include(s => s.entities).Include(s => s.entities.Select(i => i.input)).Include(s => s.entities.Select(i => i.output)) .Include(s => s.projects) .Include(s => s.resources).Where(s => s.id == id).FirstOrDefault()); } }
public ICollection <AbstractStatiscticsBean> findAll() { IList <AbstractStatiscticsBean> stat; using (var ctx = new SaprSimDbContext()) { stat = ctx.statistics.ToList(); } return(stat); }
public ICollection <Model> findAll() { IList <Model> mdls; using (var ctx = new SaprSimDbContext()) { mdls = ctx.models.ToList(); } return(mdls); }
public void saveAll(ICollection <AbstractStatiscticsBean> values) { using (var ctx = new SaprSimDbContext()) { foreach (AbstractStatiscticsBean stat in values) { ctx.statistics.Add(stat); } ctx.SaveChanges(); } }
public void saveAll(ICollection <Model> models) { using (var ctx = new SaprSimDbContext()) { foreach (Model m in models) { ctx.models.Add(m); } ctx.SaveChanges(); } }