예제 #1
0
 public Product GetById(int id)
 {
     return(_products.FirstOrDefault(p => p.id == id));
 }
예제 #2
0
파일: GenreService.cs 프로젝트: phGama/CDSL
 public DAL.Genres Find(int id)
 {
     return(genres.FirstOrDefault(x => x.Id == id));
 }
 public TEntity Obter(Expression <Func <TEntity, bool> > filter)
 {
     return(_context.FirstOrDefault(filter));
 }