예제 #1
0
 private Company ConvertViewModelToEntity(CompanyViewModel viewModel)
 {
     return new Company
     {
         ID = viewModel.CompanyID,
         LocationID = viewModel.LocationID,
         Name = viewModel.Name,
         Description = viewModel.Description
     };
 }
예제 #2
0
 public void DestroyItem(CompanyViewModel viewModel)
 {
     _companyDal.Destroy(ConvertViewModelToEntity(viewModel));
 }
예제 #3
0
 public int UpdateItem(CompanyViewModel viewModel)
 {
     return _companyDal.Update(ConvertViewModelToEntity(viewModel));
 }
예제 #4
0
 public void DeleteItem(CompanyViewModel viewModel)
 {
     _companyDal.Create(ConvertViewModelToEntity(viewModel));
 }