//[ChildActionOnly] //[OutputCache(Duration = 3600 * 24)] public ActionResult Footer() { var model = new FooterService().GetFooter(); ViewBag.TypeFooter = TypeFooterService.getAll(); ViewBag.tages = TagesService.getAll(); return(PartialView(model)); }
public EditInfosController() { context.Database.CreateIfNotExists(); PersonService = new PersonService(new Data.Repository.PersonRepository(context)); HeroBannerService = new HeroBannerService(new Data.Repository.HeroBannerRepository(context)); GroomBrideService = new GroomBrideService(new Data.Repository.GroomBrideRepository(context)); FooterService = new FooterService(new Data.Repository.FooterRepository(context)); CoupleService = new CoupleService(new Data.Repository.CoupleRepository(context)); }
public IActionResult getApoios() { try { FooterService footerService = new FooterService(this._context); footerService.GetApoios(); return(Ok(footerService.apoios)); } catch (AppException ex) { return(BadRequest(new { message = ex.Message })); } }
public HttpResponseMessage Update(HttpRequestMessage request, FooterModel FooterModel) { return(CreateHttpResponse(request, () => { HttpResponseMessage response = null; if (!ModelState.IsValid) { request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } else { var FooterService = new FooterService(); FooterService.Update(FooterModel); response = request.CreateResponse(HttpStatusCode.OK); } return response; })); }
public HttpResponseMessage DeleteMulti(HttpRequestMessage request, byte[] id) { return(CreateHttpResponse(request, () => { HttpResponseMessage response = null; if (!ModelState.IsValid) { response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState); } else { var FooterService = new FooterService(); FooterService.DeleteAll(id); response = request.CreateResponse(HttpStatusCode.OK); } return response; })); }
public IComponent GetComponent(IPublishedContent componentContent, IPublishedContent pageContent) { var documentTypeAlias = componentContent.DocumentTypeAlias; switch (documentTypeAlias) { case DocumentTypeAliases.Banner: var bannerService = new BannerService(); return(bannerService.GetViewModel(componentContent)); case DocumentTypeAliases.InformationWithoutBackground: var informationWithoutBackgroundService = new InformationWithoutBackgroundService(); return(informationWithoutBackgroundService.GetViewModel(componentContent)); case DocumentTypeAliases.InformationWithoutBackgroundVertical: var informationWithBackgroundVerticalService = new InformationWithoutBackgroundVerticalService(); return(informationWithBackgroundVerticalService.GetViewModel(componentContent)); case DocumentTypeAliases.InformationWithBackground: var informationWithBackgroundService = new InformationWithBackgroundService(); return(informationWithBackgroundService.GetViewModel(componentContent)); case DocumentTypeAliases.ContactForm: var contactFormService = new ContactFormService(); return(contactFormService.GetViewModel(componentContent)); case DocumentTypeAliases.ContactDetails: var contactDetailsService = new ContactDetailsService(); return(contactDetailsService.GetViewModel(componentContent)); case DocumentTypeAliases.Footer: var footerService = new FooterService(); return(footerService.GetViewModel(componentContent)); } return(null); }
public FooterController() { service = new FooterService(new Data.Repository.FooterRepository(context)); }
public Footer(FooterService FooterRepository) { _FooterRepository = FooterRepository; }
public void Footer(FooterModel model) { FooterService.Save(model); }
public FooterController(FooterService FooterService) { _FooterRepository = FooterService; }