public PollOption Get(int id)
 {
     return((from po in _context.Set <PollOption>().AsNoTracking()
             where
             po.Id == id
             select po).FirstOrDefault());
 }
예제 #2
0
        public T GetById(int id)
        {
            var result = _context.Set <T>().Find(id);

            return(result);
        }