Пример #1
0
        void IRepository <SuperHero> .Delete(int id)
        {
            var model = SuperHeroes.FirstOrDefault(x => x.Id == id);

            SuperHeroes.Remove(model);
            SaveChanges();
        }
Пример #2
0
 SuperHero IRepository <SuperHero> .Get(int id)
 {
     return(SuperHeroes.FirstOrDefault(x => x.Id == id));
 }