Files
myoffice/MyOffice.Data.Repositories/Verifications/VerificationCodeRepository.cs
T
2026-06-04 09:44:23 +03:00

22 lines
521 B
C#

namespace MyOffice.Data.Repositories.Item;
using Microsoft.EntityFrameworkCore;
using MyOffice.Data.Models.Verifications;
public class VerificationCodeRepository : AppRepository<VerificationCode>, IVerificationCodeRepository
{
public bool Add(VerificationCode entity)
{
return AddBase(entity) > 0;
}
public bool Update(VerificationCode entity)
{
return UpdateBase(entity) > 0;
}
public VerificationCode? GetByCode(string code)
{
return _context.Verifications.FirstOrDefault(x => x.Code == code);
}
}