Ejemplo n.º 1
0
        public async Task <ActionResult> List([DataSourceRequest] DataSourceRequest request)
        {
            var entities = await _emailTemplateService.GetAllEmailTemplates();

            var models = entities.Select(e => e.ToModel()).ToList();
            var result = new DataSourceResult {
                Data = models, Total = models.Count
            };

            return(Json(result));
        }