public JsonNetResult GetModulesList() { List <Module> modules = _moduleRepository .BeginTransaction().All() .ToList(); _moduleRepository.CommitTransaction(); List <ModuleModel> models = Mapper.Map <List <ModuleModel> >(modules); return(new JsonNetResult(models)); }
public JsonNetResult GetPageWidgetsList(Guid pageId) { List <PageWidget> widgets = _pageWidgetRepository .BeginTransaction().All() .Where(w => w.Page.Id == pageId) .ToList(); _pageWidgetRepository.CommitTransaction(); List <PageWidgetModel> models = Mapper.Map <List <PageWidgetModel> >(widgets); return(new JsonNetResult(models)); }