File size: 427 Bytes
6db0915
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using ECommerce.Model.Data;
using ECommerce.Model.Entities;
using Microsoft.EntityFrameworkCore;

namespace ECommerce.Model.Repositories;

public class CustomerRepository : Repository<Customer>, ICustomerRepository
{
    public CustomerRepository(AppDbContext context) : base(context) { }

    public async Task<Customer?> GetByUserIdAsync(string userId) =>
        await _dbSet.FirstOrDefaultAsync(c => c.UserId == userId);
}