public void Update(OnThisDay onThisDay) { context.OnThisDay.Attach(onThisDay); context.Entry(onThisDay).State = EntityState.Modified; }
public void Add(OnThisDay onThisDay) { context.OnThisDay.Add(onThisDay); }
public void Delete(OnThisDay onThisDay) { context.OnThisDay.Remove(onThisDay); }
public void Update(OnThisDay onThisDay) { OnThisDayRepository.Update(onThisDay); }
public void Delete(OnThisDay onThisDay) { OnThisDayRepository.Delete(onThisDay); }
public void Add(OnThisDay onThisDay) { OnThisDayRepository.Add(onThisDay); }
public IActionResult Delete([FromBody] OnThisDay onThisDay) { OnThisDayService.Delete(onThisDay); OnThisDayService.SaveChanges(); return(Ok()); }
public IActionResult Add([FromBody] OnThisDay onThisDay) { OnThisDayService.Add(onThisDay); OnThisDayService.SaveChanges(); return(Created("Event created", onThisDay.Id)); }