public static bool HasInsertRight(this IRepository <Fascicle> repository, string username, string domain, Entity.Fascicles.FascicleType fascicleType) { return(repository.ExecuteModelScalarFunction <bool>(CommonDefinition.SQL_FX_Fascicle_HasInsertRight, new QueryParameter(CommonDefinition.SQL_Param_Fascicle_UserName, username), new QueryParameter(CommonDefinition.SQL_Param_Fascicle_Domain, domain), new QueryParameter(CommonDefinition.SQL_Param_Fascicle_FascicleType, (int)fascicleType))); }
public static IQueryable <Fascicle> GetByNumbering(this IRepository <Fascicle> repository, short year, int number, short idCategory, Entity.Fascicles.FascicleType fascicleType) { return(repository.Query(x => x.Year == year && x.Number == number && x.Category.EntityShortId == idCategory && x.FascicleType == fascicleType) .Include(i => i.Category) .SelectAsQueryable()); }