示例#1
0
        public CCustomer GetOneCustomerByEmail(string email)
        {
            using var context = new Project0databaseContext(_contextOptions);
            var dbCustomer = context.Customers.FirstOrDefault(x => x.Email == email);

            if (dbCustomer == null)
            {
                return(null);
            }
            var domainCustomer = DomainModelMapper.MapSingleCustomer(dbCustomer);

            return(domainCustomer);
        }