Spaces:
Running
Running
Download FlowAPI.Infrastructure/Repositories/UserRepository.cs from DanilDrotik/FlowAPI: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/DanilDrotik/FlowAPI/resolve/d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/UserRepository.cs
- Command line
-
hf download hf://spaces/DanilDrotik/FlowAPI@d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/UserRepository.cs
-
curl -L -o UserRepository.cs https://huggingface.co/spaces/DanilDrotik/FlowAPI/resolve/d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/UserRepository.cs
511 Bytes
| using FlowAPI.Application.Interfaces; | |
| using FlowAPI.Domain.Entities; | |
| using FlowAPI.Infrastructure.Data; | |
| using Microsoft.EntityFrameworkCore; | |
| namespace FlowAPI.Infrastructure.Repositories | |
| { | |
| public class UserRepository : GenericRepository<User>, IUserRepository | |
| { | |
| public UserRepository(AppDbContext context) : base(context) { } | |
| public async Task<User?> GetByEmailAsync(string email) | |
| { | |
| return await _dbSet.FirstOrDefaultAsync(u => u.Email == email); | |
| } | |
| } | |
| } | |