public ViewResult SelectTemplate() { var vm = new Models.SelectedTemplateViewModel(); vm.Templates = _templateServices.GetAll(); return(View(vm)); }
// Templates public IHttpActionResult GetAll() { try { var result = _templateServices.GetAll(); if (result == null || !result.Any()) { return(StatusCode(HttpStatusCode.NoContent)); } var model = AutoMapper.Mapper.Map <IEnumerable <SmsTemplateModel> >(result); return(Ok(model)); } catch (Exception ex) { return(InternalServerError(ex)); } }
// GET: SMSTemplate public ViewResult Index() { return(View(templateServices.GetAll())); }