Exemple #1
0
        /// <summary>
        /// Get Unit By Id
        /// </summary>
        /// <param name="id">Unit Id</param>
        /// <returns>Unit Request</returns>
        public async Task <UnitRequest> GetUnitById(int id)
        {
            var data = await _repository.GetUnitById(id);

            return(new UnitRequest
            {
                Id = data.Id,
                UnitName = data.UnitName,
                IsActive = data.IsActive
            });

            //return _mapper.Map<UnitRequest>(data, x=> x.);
        }