public LandlordDTO(Landlord landlord) { Id = landlord.LandlordId; Forename = landlord.Forename; Surname = landlord.Surname; Email = landlord.Email; Phone = landlord.Phone; }
public int CreateLandLord(LandlordDTO dto) { if (dto is null) { return(0); } var landlord = new Landlord() { Forename = dto.Forename, Surname = dto.Surname, Email = dto.Email, Phone = dto.Phone }; dataContext.Landlords.InsertOnSubmit(landlord); dataContext.SubmitChanges(); return(landlord.LandlordId); }
partial void DeleteLandlord(Landlord instance);
partial void UpdateLandlord(Landlord instance);
partial void InsertLandlord(Landlord instance);