/// <summary> /// Get Unit list /// </summary> /// <param name="paginationFilter"></param> /// <returns></returns> public async Task <List <UnitRequest> > GetUnitsAsync(PaginationFilter paginationFilter) { var data = await _repository.GetUnitsAsync(paginationFilter); return(data.Select(x => new UnitRequest { Id = x.Id, UnitName = x.UnitName }).ToList()); //return _mapper.Map<List<UnitRequest>>(data); }
public async Task <IActionResult> Get() { var units = await _db.GetUnitsAsync(); return(Ok(units)); }