Esempio n. 1
0
 internal MortgagesDO(Mortgage mortgage)
 {
     this.Id = mortgage.Id;
     this.LandPropertiyID = mortgage.LandPropertiyID;
     this.Date = mortgage.Date;
     this.MoneyRecieved = mortgage.MoneyRecieved;
 }
        private async Task<bool> AddMortageAsync(dynamic data)
        {
            Mortgage newMortgage = new Mortgage();
            newMortgage.LandPropertiyID = data.LandPropertiyID;
            newMortgage.Date = data.Date;
            newMortgage.MoneyRecieved = data.MoneyRecieved;

            this.entities.Mortgages.Add(newMortgage);
            await this.entities.SaveChangesAsync();

            return true;
        }