public IResponseData <IList <ContentTypeListItem> > GetContentTypes() { IResponseData <IList <ContentTypeListItem> > response = new ResponseData <IList <ContentTypeListItem> >(); try { IContentTypeService service = IoC.Container.Resolve <IContentTypeService>(); IList <ContentTypeListItem> items = service.GetContentTypes(); response.SetData(items); } catch (ValidationException ex) { response.SetErrors(ex.Errors); response.SetStatus(HttpStatusCode.PreconditionFailed); } return(response); }
public IList <ContentTypeListItem> GetContentTypes() { IContentTypeService service = IoC.Container.Resolve <IContentTypeService>(); return(service.GetContentTypes()); }