public IHttpActionResult GetNotificationTemplates(string type, string objectId, string objectTypeId) { List <webModels.NotificationTemplate> retVal = new List <webModels.NotificationTemplate>(); var templates = _notificationTemplateService.GetNotificationTemplatesByNotification(type, objectId, objectTypeId); if (templates.Any()) { retVal = templates.Select(t => t.ToWebModel()).ToList(); } return(Ok(retVal.ToArray())); }