How do we Check Duplicate Entities
in Fluent Validators ?
Where this duplicate check should be done? Contract/Domain/Application project ?
Cause I have my Validator's in Application.Contracts project. Is this the right way to do it?
Hi
Suppose this is my DTO
public class AnyDto
{
[Required(ErrorMessage="Name is required")]
public string Name { get; set;}
}
Or suppose this is my Validator Class
public class AnyDtoValidator : AbstractValidator<AnyDto>
{
public AnyDtoValidator()
{
RuleFor(x => x.Name).NotNull().WithMessage("Name is required");
}
}
I want to localize my errror message which is Name is required
.
How do I do it ?
Kindly provide solution in both cases DTO/Fluent Validators
Hi,
I am able to create user using IdentityUserManager.CreateAsync
method but once the user is created I want to return the inserted userId.
How to get inserted UserId ?
I want to create a user from my custom appService i.e I just want to call create() method of UserAppService from my custom appService. Which Interface do I have to inject in my appService ?