Пример #1
0
        public IHttpActionResult GetById(int PersonnelId)
        {
            PersonnelService personnelService = CreatePersonnelService();
            var personnelById = personnelService.GetPersonnelById(PersonnelId);

            return(Ok(personnelById));
        }
Пример #2
0
        public ActionResult GetPersonnelById(int personnelId)
        {
            Personnel personnel = _personnelService.GetPersonnelById(personnelId);
            //return new JsonResult { Data = personnel, JsonRequestBehavior = JsonRequestBehavior.AllowGet };

            var personnelJSON = GeneralExtensions.SerializeJSON(personnel);

            return(Content(personnelJSON, "application/json"));
        }