WPF -репозиторий запрос Async Async с включением свойств
public T Get(int id, params Expression<Func<T, object>>[] includes)
{
IQueryable<T> query = _context.Set<T>();
if (includes != null)
foreach (Expression<Func<T, object>> include in includes)
query = query.Include(include);
return ((DbSet<T>)query).Find(id);
}
Confused Cobra