Пример #1
0
 public void Update(DalArtist entity)
 {
     Artist artist = entity.ToOrmArtist();
     _context.Set<Artist>().AddOrUpdate(artist);
 }
Пример #2
0
 public void Delete(DalArtist entity)
 {
     Artist artist = entity.ToOrmArtist();
     artist = _context.Set<Artist>().Single(a => a.Id == artist.Id);
     _context.Set<Artist>().Remove(artist);
 }