public void update(logininfo editItem) { logininfo selectedItem = db.logininfoes.SingleOrDefault(item => item.user_userid == editItem.user_userid); selectedItem.lastlogindate = editItem.lastlogindate; selectedItem.lockedout = editItem.lockedout; selectedItem.cumulativefailures = editItem.cumulativefailures; selectedItem.updatedate = editItem.updatedate; db.SaveChanges(); }
public void insert(logininfo newItem) { db.logininfoes.Add(newItem); db.SaveChanges(); }
public logininfo selectSingle(logininfo findItem) { logininfo selectedItem = db.logininfoes.SingleOrDefault(item => item.user_userid == findItem.user_userid); return selectedItem; }
public void delete(logininfo deleteItem) { logininfo selectedItem= db.logininfoes.First(item => item.user_userid == deleteItem.user_userid); db.logininfoes.Remove(selectedItem); db.SaveChanges(); }