private void Create(AssetGroupInput assetGroupInput)
        {
            var assetGroupEntity = ObjectMapper.Map <AssetGroup>(assetGroupInput);

            SetAuditInsert(assetGroupEntity);
            assetGroupRepository.Insert(assetGroupEntity);
            CurrentUnitOfWork.SaveChanges();
        }
 public void CreateOrEditAssetGroup(AssetGroupInput assetGroupInput)
 {
     if (assetGroupInput.Id == 0)
     {
         Create(assetGroupInput);
     }
     else
     {
         Update(assetGroupInput);
     }
 }
        private void Update(AssetGroupInput assetGroupInput)
        {
            var assetGroupEntity = assetGroupRepository.GetAll().Where(x => !x.IsDelete).SingleOrDefault(x => x.Id == assetGroupInput.Id);

            if (assetGroupEntity == null)
            {
            }
            ObjectMapper.Map(assetGroupInput, assetGroupEntity);
            SetAuditEdit(assetGroupEntity);
            assetGroupRepository.Update(assetGroupEntity);
            CurrentUnitOfWork.SaveChanges();
        }
 public void CreateOrEditAssetGroup([FromBody] AssetGroupInput input)
 {
     assetGroupAppService.CreateOrEditAssetGroup(input);
 }