// GET api/<controller>/5
        public IHttpActionResult Get(int id)
        {
            using (var personsBusiness = new PersonsBusiness())
            {
                Persons        person  = personsBusiness.SelectPersonById(id);
                List <Persons> persons = new List <Persons>();
                persons.Add(person);

                var content = new ResponseContent <Persons>(persons);

                return(new StandartResult <Persons>(content, Request));
            }
        }
예제 #2
0
 private PersonsEntity SelectPersonById(int id)
 {
     try
     {
         using (var Persons = new PersonsBusiness())
         {
             return(Persons.SelectPersonById(id));
         }
     }
     catch (Exception ex)
     {
         //Log exception error
         _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true);
     }
     return(null);
 }