I have repository generic where I do method as Get,Update,Insert.
I get a data from table in data base I use this method.
public IEnumerable
I find a form get this result for example Product and Category in repository Generic through include.
public IEnumerable Get(Expression> newObjectEntity,int page, int rowsByPage, string include) where typeEntity : class
{
List Result = null;
Result = Context.Set().Where(newObjectEntity).include(include).OrderBy(m => true).Skip(5 * (page - 1)).Take(rowsByPage).ToList();
return Result;
}
With include you can string for example Product->Category and get this object.