public static void DeleteMapping(AppLab_mapping source) { using (var dbContext = new HMSEntities()) { var dbobj = dbContext.Lab_Mapping.FirstOrDefault(o => o.Id == source.Id); dbContext.Lab_Mapping.Remove(dbobj); dbContext.SaveChanges(); } }
public JsonResult DeleteMapping(AppLab_mapping source) { LabService.DeleteMapping(source); return(Json(false, JsonRequestBehavior.AllowGet)); }