public int CarRegistration(CarVM carVM) { try { _mapper = profile.Map().CreateMapper(); CarMaster carMaster = _mapper.Map <CarVM, CarMaster>(carVM); _uow.CarMasters.Add(carMaster); return(_uow.CommitChanges()); } catch (Exception ex) { return(0); } }
public int UserRegistration(RegisterVM registerVM) { try { _mapper = profile.Map().CreateMapper(); UserMaster userMaster = _mapper.Map <RegisterVM, UserMaster>(registerVM); _uow.UserMasters.Add(userMaster); return(_uow.CommitChanges()); } catch (Exception ex) { return(0); } }