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);
 }
Exemple #4
0
 public void Update(OnThisDay onThisDay)
 {
     OnThisDayRepository.Update(onThisDay);
 }
Exemple #5
0
 public void Delete(OnThisDay onThisDay)
 {
     OnThisDayRepository.Delete(onThisDay);
 }
Exemple #6
0
 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));
 }