Advertisement
artursn

Untitled

Sep 5th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. public IQueryable<Sport> GetObjectByID(int id){
  2.    return (from i in service.Sport where i.ID == id select i);
  3. }
  4.  
  5. //как перенести в абстрактный класс
  6. public IQueryable<T> GetObjectByID(int id){
  7. // тут service.T недоступно. как можно сюда передать имя класса в виде переменной
  8.    return (from i in service.Sport where i.ID == id select i);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement