Example #1
0
 /// <summary>
 /// The GetHardware
 /// </summary>
 /// <param name="id">The id<see cref="int"/></param>
 /// <returns>The <see cref="ServiceResult"/></returns>
 public ServiceResult GetHardware(int id)
 {
     return(new ServiceResult(true)
     {
         Data = _repository.Get(x => x.Identifier == id)
     });
 }
Example #2
0
        public IHttpActionResult GetHardware(int id)
        {
            var hardware = _repository.Get(id);

            if (hardware == null)
            {
                return(NotFound());
            }

            return(Ok(MapBackToDto(hardware)));
        }