public Entity.BaseResponse <Entity.DeviceType> Get(string id) { if (id == null || id == string.Empty) { return(new Entity.BaseResponse <Entity.DeviceType>(false, "Device Type id required!")); } Entity.BaseResponse <Entity.DeviceType> response = new Entity.BaseResponse <Entity.DeviceType>(true); try { response.Data = _service.Get(Guid.Parse(id)); } catch (Exception ex) { base.LogException(ex); return(new Entity.BaseResponse <Entity.DeviceType>(false, ex.Message)); } return(response); }
public async Task <IActionResult> GetListing() { var listing = await service.Get <DeviceTypeListingModel>(); return(Ok(listing)); }