public ActionResult _Add(int id, string callback) { ViewBag.Callback = callback; var service = new ServiceOutage { ServiceId = id }; return(PartialView(service)); }
public ServiceOutage Delete(ServiceOutage service) { try { using (var c = new ServiceDBModel()) { c.ServiceOutages.Remove(c.ServiceOutages.FirstOrDefault(x => x.Id == service.Id)); c.SaveChanges(); return(service); } } catch (Exception e) { return(null); } }
public ServiceOutage Add(ServiceOutage service) { try { using (var c = new ServiceDBModel()) { c.ServiceOutages.Add(service); c.SaveChanges(); return(service); } } catch (Exception e) { return(null); } }
public ServiceOutage Update(ServiceOutage service) { try { using (var c = new ServiceDBModel()) { c.Entry(service).State = EntityState.Modified; c.SaveChanges(); return(service); } } catch (Exception e) { return(null); } }
public Task <ServiceOutage> UpdateItemAsync(ServiceOutage item) { throw new NotImplementedException(); }