Beispiel #1
0
        public ActionResult GetAllTechnologies([DataSourceRequest] DataSourceRequest request)
        {
            var technologies          = _technologyService.GetAllTechnologies();
            var technologiesViewModel = _mappingService.Map <IEnumerable <TechnologyBusinessModel>, IEnumerable <TechnologyViewModel> >(technologies);
            var jsonResult            = technologiesViewModel.ToDataSourceResult(request);

            return(Json(jsonResult, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
 public IHttpActionResult GetAll()
 {
     return(Ok(_service.GetAllTechnologies().Select(dto =>
     {
         dto.Url = Url.Link("GetTechnologyById", new { id = dto.Id });
         return dto;
     }).ToList()));
 }