Beispiel #1
0
        public static void Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();

            CreateDbIfNotExists(host);
            GetRepo.SetProvider(host.Services);
            host.Run();
        }
 public async Task<AppUser> FindByNameAsync(string userName)
 {
     try
     {
         return await GetRepo.UsersRepo(_userManager).FindByNameAsync(userName);
     }
     catch
     {
         throw;
     }
 }
 public async Task<IdentityResult> RegisterUser(AppUser user, string password)
 {
     try
     {
         return await GetRepo.UsersRepo(_userManager).RegisterUser(user, password);
     }
     catch
     {
         throw;
     }
 }
Beispiel #4
0
 public async Task <Customer> GetCustomer(string userId)
 {
     try
     {
         return(await GetRepo.CustomersRepo().GetCustomer(userId));
     }
     catch
     {
         throw;
     }
 }
Beispiel #5
0
 public async Task <int> RegisterCustomer(Customer user)
 {
     try
     {
         return(await GetRepo.CustomersRepo().RegisterCustomer(user));
     }
     catch
     {
         throw;
     }
 }
 public async Task <int> SendEmail()
 {
     try
     {
         return(await GetRepo.EmailService().SendEmail());
     }
     catch
     {
         throw;
     }
 }