Changeset 3b395c5 for src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/TeamWithUidExist.cs
- Timestamp:
- 10/21/21 19:17:43 (3 years ago)
- Branches:
- dev
- Children:
- 31c006c, 45cf412
- Parents:
- 9885bee (diff), 95d80e4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/TeamWithUidExist.cs
r9885bee r3b395c5 1 using FinkiChattery.Persistence. Repositories;1 using FinkiChattery.Persistence.UnitOfWork; 2 2 using FluentValidation.Validators; 3 3 using System; … … 9 9 public class TeamWithUidExist : AsyncValidatorBase 10 10 { 11 public TeamWithUidExist(I TeamRepo teamRepo)11 public TeamWithUidExist(IUnitOfWork unitOfWork) 12 12 { 13 TeamRepo = teamRepo;13 UnitOfWork = unitOfWork; 14 14 } 15 15 16 public I TeamRepo TeamRepo{ get; }16 public IUnitOfWork UnitOfWork { 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 TeamRepo.TeamWithUidExists(teamUid);21 return await UnitOfWork.Teams.TeamWithUidExists(teamUid); 22 22 } 23 23
Note:
See TracChangeset
for help on using the changeset viewer.