public static DAL.AmountPeopleInShelter DtoToDAL(AmountPeopleInShelterDTO amountPPLDTO) { DAL.AmountPeopleInShelter amountPPLDAL = new DAL.AmountPeopleInShelter(); amountPPLDAL.AmountpplKey = amountPPLDTO.AmountpplKey; amountPPLDAL.ShelterKey = amountPPLDTO.ShelterKey; amountPPLDAL.AmountPPLSpeDH = amountPPLDTO.AmountPPLSpeDH; amountPPLDAL.Date = amountPPLDTO.Date; amountPPLDAL.Time = amountPPLDTO.Time; return(amountPPLDAL); }
public static bool UpdateAmountPPLInShelter(AmountPeopleInShelterDTO amountPPLDTO) { DAL.AmountPeopleInShelter amountPPLDAL = DtoToDAL(amountPPLDTO); try { db.AmountPeopleInShelters.Add(amountPPLDAL); db.SaveChanges(); return(true); } catch (Exception e) { return(false); } }