public override IQueryOver <Menu, Menu> CreateQueryForRetrieval(IQueryOver <Menu, Menu> query, string filter, IDictionary <string, object> additionalParameters) { var menuId = InputProcessingMethods.GetValue <string>(additionalParameters, "MenuId"); if (!String.IsNullOrWhiteSpace(menuId)) { query = query.Where(m => m.ParentMenu.Id == menuId); } else { query = query.Where(m => m.ParentMenu == null); } if (!String.IsNullOrWhiteSpace(filter)) { query = query.WhereRestrictionOn(x => x.Name).IsLike(filter, MatchMode.Anywhere); } query = query.OrderBy(m => m.Position).Asc(); return(query); }
public string GetValue(string propertyName) { return(InputProcessingMethods.GetValue <string>(InputData, propertyName)); }
public T GetValue <T>(string propertyName, T defaultValue = default(T)) { return(InputProcessingMethods.GetValue(InputData, propertyName, defaultValue)); }