Changes in src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/TeamWithUidExist.cs [95d80e4:7146ebb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/TeamWithUidExist.cs
r95d80e4 r7146ebb 1 using FinkiChattery.Persistence. UnitOfWork;1 using FinkiChattery.Persistence.Repositories; 2 2 using FluentValidation.Validators; 3 3 using System; … … 9 9 public class TeamWithUidExist : AsyncValidatorBase 10 10 { 11 public TeamWithUidExist(I UnitOfWork unitOfWork)11 public TeamWithUidExist(ITeamRepo teamRepo) 12 12 { 13 UnitOfWork = unitOfWork;13 TeamRepo = teamRepo; 14 14 } 15 15 16 public I UnitOfWork UnitOfWork{ get; }16 public ITeamRepo TeamRepo { get; } 17 17 18 18 protected override async Task<bool> IsValidAsync(PropertyValidatorContext context, CancellationToken cancellation) 19 19 { 20 20 var teamUid = (Guid)context.PropertyValue; 21 return await UnitOfWork.Teams.TeamWithUidExists(teamUid);21 return await TeamRepo.TeamWithUidExists(teamUid); 22 22 } 23 23
Note:
See TracChangeset
for help on using the changeset viewer.