public ActionResult Create([Bind(Include = "GameID,DatePlayed,Challenger,Challenged,Accepted,Message,WinnerID,LoserID,ReporterID")] Games games) { if (ModelState.IsValid) { db.Games_s.Add(games); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(games)); }
public ActionResult Create([Bind(Include = "PersonID,Username,Password,Notifications,Available,LastName,FirstName,Score")] Users users) { if (ModelState.IsValid) { db.Users_s.Add(users); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(users)); }
public void Remove(T record) { using (var context = new AWSContext()) { context.Entry(record).State = EntityState.Deleted; context.SaveChanges(); } }
public void Add(T record) { using (var context = new AWSContext()) { context.Entry(record).State = EntityState.Added; context.SaveChanges(); } }
public void Update(T record) { using (var context = new AWSContext()) { context.Entry(record).State = EntityState.Modified; context.SaveChanges(); } }
public void RemoveRange(List <T> records) { using (var context = new AWSContext()) { foreach (var record in records) { context.Entry(record).State = EntityState.Deleted; } context.SaveChanges(); } }