public void Post(tareasCheck tcheck) { if (ModelState.IsValid) { myEntity.tareasChecks.Add(tcheck); myEntity.SaveChanges(); } }
public void Put(tareasCheck tcheck) { if (ModelState.IsValid) { myEntity.Entry(tcheck).State = EntityState.Modified; try { myEntity.SaveChanges(); } catch (Exception) { throw; } } }
public void Delete(int id) { tareasCheck dlt = myEntity.tareasChecks.Find(id); if (dlt != null) { try { myEntity.tareasChecks.Remove(dlt); myEntity.SaveChanges(); } catch (Exception) { throw; } } }
public tareasCheck Get(int id) { tareasCheck tcheck = myEntity.tareasChecks.Find(id); return(tcheck); }