healthchecks
This commit is contained in:
@@ -4,6 +4,7 @@ using Transactional.Abstractions.Interfaces;
|
||||
|
||||
namespace back.persistance.data.repositories.Abstracts;
|
||||
|
||||
public interface IPersonRepository : IRepository<Person, string>, IScoped
|
||||
public interface IPersonRepository : IRepository<Person>, IScoped
|
||||
{
|
||||
|
||||
}
|
@@ -4,5 +4,5 @@ using Transactional.Abstractions.Interfaces;
|
||||
|
||||
namespace back.persistance.data.repositories.Abstracts;
|
||||
|
||||
public interface IPhotoRepository : IRepository<Photo, string>, IScoped
|
||||
public interface IPhotoRepository : IRepository<Photo>, IScoped
|
||||
{ }
|
||||
|
@@ -4,7 +4,7 @@ using Transactional.Abstractions.Interfaces;
|
||||
|
||||
namespace back.persistance.data.repositories.Abstracts;
|
||||
|
||||
public interface IUserRepository : IRepository<User, string>, IScoped
|
||||
public interface IUserRepository : IRepository<User>, IScoped
|
||||
{
|
||||
Task<User?> GetByEmail(string email);
|
||||
Task<string?> GetUserSaltByEmail(string email);
|
||||
|
@@ -4,7 +4,7 @@ using Transactional.Implementations.EntityFramework;
|
||||
|
||||
namespace back.persistance.data.repositories;
|
||||
|
||||
public class PersonRepository(DataContext context) : ReadWriteRepository<Person, string>(context), IPersonRepository
|
||||
public class PersonRepository(DataContext context) : ReadWriteRepository<Person>(context), IPersonRepository
|
||||
{
|
||||
// Implement methods specific to Photo repository if needed
|
||||
}
|
@@ -4,7 +4,7 @@ using Transactional.Implementations.EntityFramework;
|
||||
|
||||
namespace back.persistance.data.repositories;
|
||||
|
||||
public class PhotoRepository(DataContext context) : ReadWriteRepository<Photo, string>(context), IPhotoRepository
|
||||
public class PhotoRepository(DataContext context) : ReadWriteRepository<Photo>(context), IPhotoRepository
|
||||
{
|
||||
// Implement methods specific to Photo repository if needed
|
||||
}
|
||||
|
@@ -5,14 +5,14 @@ using Transactional.Implementations.EntityFramework;
|
||||
|
||||
namespace back.persistance.data.repositories;
|
||||
|
||||
public class UserRepository(DataContext context) : ReadWriteRepository<User, string>(context), IUserRepository
|
||||
public class UserRepository(DataContext context) : ReadWriteRepository<User>(context), IUserRepository
|
||||
{
|
||||
public async Task<User?> GetByEmail(string email)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(email)) return null;
|
||||
return await Entity.FirstOrDefaultAsync(u => u.Email == email);
|
||||
return await Entities.FirstOrDefaultAsync(u => u.Email == email);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -25,7 +25,7 @@ public class UserRepository(DataContext context) : ReadWriteRepository<User, str
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(email)) return string.Empty;
|
||||
var user = await Entity.FirstOrDefaultAsync(u => u.Email == email);
|
||||
var user = await Entities.FirstOrDefaultAsync(u => u.Email == email);
|
||||
return user?.Salt ?? string.Empty;
|
||||
}
|
||||
catch
|
||||
@@ -39,7 +39,7 @@ public class UserRepository(DataContext context) : ReadWriteRepository<User, str
|
||||
if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password)) return null;
|
||||
try
|
||||
{
|
||||
return await Entity.FirstOrDefaultAsync(u => u.Email == email && u.Password == password);
|
||||
return await Entities.FirstOrDefaultAsync(u => u.Email == email && u.Password == password);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -52,7 +52,7 @@ public class UserRepository(DataContext context) : ReadWriteRepository<User, str
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(email)) return false;
|
||||
return await Entity.AnyAsync(u => u.Email == email);
|
||||
return await Entities.AnyAsync(u => u.Email == email);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
Reference in New Issue
Block a user