public void Insert(Project0.Library.Customer obj)
        {
            Customer entity = Mapper.MapCustomerToDbEntry(obj);

            _dbContext.Add(entity);
            Save();
        }
        //Create Methods
        //Customers
        /// <summary>
        /// This method creates a customer in the database.
        /// It needs two strings, a first name and last name.
        /// </summary>
        /// <returns>
        /// Customers Object that contains the customer name and id.
        /// </returns>
        public Customers CreateCustomer(string firstName, string lastName)
        {
            DbContextOptions <project0Context> options = new DbContextOptionsBuilder <project0Context>()
                                                         .UseSqlServer(SecretConfiguration.SecretString)
                                                         .Options;
            var db = new project0Context(options);

            var NewCustomer = new Customers();

            NewCustomer.FirstName = firstName;
            NewCustomer.LastName  = lastName;

            db.Add(NewCustomer);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException ex)
            {
                // Exceptions:
                //   T:Microsoft.EntityFrameworkCore.DbUpdateException:
                //     An error is encountered while saving to the database.
                Console.WriteLine($"There was a database error, please try again and if the error persists, contact a supervisor :\n{ex}");
                logger.Error($"There was a database error while creating a customer :\n{ex}");
                return(new Customers());
            }

            return(NewCustomer);
        }