From be5260547b69d2035505ec356a7c78777451a7d1 Mon Sep 17 00:00:00 2001 From: Drew Rautenberg Date: Sat, 18 Jul 2026 18:57:59 -0500 Subject: [PATCH] moved inputs to ctor for better encapsulation --- barkmanAPI/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/barkmanAPI/Program.cs b/barkmanAPI/Program.cs index 658b103..9a9de8e 100644 --- a/barkmanAPI/Program.cs +++ b/barkmanAPI/Program.cs @@ -209,10 +209,10 @@ customerGroup.MapPost("", async (Customers newCustomerInput, BarkContext db) => { Name = newCustomerInput.Name, Email = newCustomerInput.Email, + Company = newCustomerInput.Company, + PhoneNumber = newCustomerInput.PhoneNumber, + Address = newCustomerInput.Address, }; - newCustomer.Company = newCustomerInput.Company; - newCustomer.PhoneNumber = newCustomerInput.PhoneNumber; - newCustomer.Address = newCustomerInput.Address; db.Customers.Add(newCustomer); await db.SaveChangesAsync();