public void CreateContainerType(ContainerTypeViewModel customerViewModel) { var customer = Mapper.Map <ContainerTypeViewModel, ContainerType_M>(customerViewModel); _containertypeRepository.Add(customer); SaveContainerType(); }
public void UpdateContainerType(ContainerTypeViewModel customer) { var customerToRemove = _containertypeRepository.GetById(customer.ContainerTypeC); var updateCustomer = Mapper.Map <ContainerTypeViewModel, ContainerType_M>(customer); _containertypeRepository.Delete(customerToRemove); _containertypeRepository.Add(updateCustomer); SaveContainerType(); }
public void Put(ContainerTypeViewModel containertype) { _containertypeService.UpdateContainerType(containertype); }
public void Post(ContainerTypeViewModel containertype) { _containertypeService.CreateContainerType(containertype); }