AspNetCorePostgreSQLDockerApp.Repository.CustomersRepository.InsertCustomerAsync C# (CSharp) Метод

InsertCustomerAsync() публичный Метод

public InsertCustomerAsync ( Customer customer ) : Task
customer AspNetCorePostgreSQLDockerApp.Models.Customer
Результат Task
        public async Task<Customer> InsertCustomerAsync(Customer customer)
        {
            _context.Add(customer);
            try
            {
              await _context.SaveChangesAsync();
            }
            catch (System.Exception exp)
            {
               _logger.LogError($"Error in {nameof(InsertCustomerAsync)}: " + exp.Message);
            }

            return customer;
        }