Пример #1
0
 public async Task UpdateAndSave(FinalProject.Models.Authors author)
 {
     _authorRepo.Update(author);
     await _authorRepo.Save();
 }
Пример #2
0
 public async Task AddAndSave(FinalProject.Models.Authors author)
 {
     _authorRepo.Add(author);
     await _authorRepo.Save();
 }
Пример #3
0
 public void Delete(string Id)
 {
     FinalProject.Models.Authors author = _context.Authors.Find(Id);
     _context.Authors.Remove(author);
 }
Пример #4
0
 public void Update(FinalProject.Models.Authors author)
 {
     _context.Entry(author).State = EntityState.Modified;
 }
Пример #5
0
 public void Add(FinalProject.Models.Authors author)
 {
     _context.Authors.Add(author);
 }