This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EntityIdOperationFilterInputType : FilterInputType | |
{ | |
protected override void Configure(IFilterInputTypeDescriptor descriptor) | |
{ | |
descriptor | |
.Operation(DefaultFilterOperations.Equals) | |
.Type<LongType>(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class AddTemporaryFileInputValidator : AbstractValidator<AddTemporaryFileInput> | |
{ | |
public AddTemporaryFileInputValidator() | |
{ | |
this.RuleFor(f => f.TemporaryFileName) | |
.NotEmptyWithLength(FileName.MinimumLength, FileName.MaximumLength) // using VO metadata | |
.Must(FileName.ValidateCharacters) // using VO validation logic | |
.WithErrorCode(nameof(FileName.Errors.FileNameDisallowedCharacters)); // using VO validation message/code | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IRepository<TAggregateRoot> where TAggregateRoot : IAggregateRoot | |
{ | |
public void Add(params TAggregateRoot[] entities); | |
public void Remove(params TAggregateRoot[] entities); | |
public Task<TAggregateRoot?> SingleOrDefaultAsync( | |
ISpecification<TAggregateRoot> specification, | |
CancellationToken cancellationToken = default); |
OlderNewer