private Company ConvertViewModelToEntity(CompanyViewModel viewModel) { return new Company { ID = viewModel.CompanyID, LocationID = viewModel.LocationID, Name = viewModel.Name, Description = viewModel.Description }; }
public void DestroyItem(CompanyViewModel viewModel) { _companyDal.Destroy(ConvertViewModelToEntity(viewModel)); }
public int UpdateItem(CompanyViewModel viewModel) { return _companyDal.Update(ConvertViewModelToEntity(viewModel)); }
public void DeleteItem(CompanyViewModel viewModel) { _companyDal.Create(ConvertViewModelToEntity(viewModel)); }