public void UpdateVessel(VesselViewModel Vessel) { var vesselToRemove = _vesselRepository.GetById(Vessel.VesselC); var updateVessel = Mapper.Map <VesselViewModel, Vessel_M>(Vessel); _vesselRepository.Delete(vesselToRemove); _vesselRepository.Add(updateVessel); SaveVessel(); }
public static bool Delete(int Id) { return(repository.Delete(Id)); }