예제 #1
0
 public LandlordDTO(Landlord landlord)
 {
     Id       = landlord.LandlordId;
     Forename = landlord.Forename;
     Surname  = landlord.Surname;
     Email    = landlord.Email;
     Phone    = landlord.Phone;
 }
예제 #2
0
        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);
        }
예제 #3
0
 partial void DeleteLandlord(Landlord instance);
예제 #4
0
 partial void UpdateLandlord(Landlord instance);
예제 #5
0
 partial void InsertLandlord(Landlord instance);