protected override ValidationResult IsValid(object value, ValidationContext validationContext) { IDataAccessHelper Dal = DependencyResolver.Current.GetService <IDataAccessHelper>(); // too slow bool isValid = true; if (value == null) { isValid = false; _errorMessage = "{0} Cannot be empty"; } else { string email = value.ToString(); if (Dal.User.FindByEmail(email) != null) { isValid = false; } } if (isValid) { return(ValidationResult.Success); } else { return(new ValidationResult(String.Format(_errorMessage, validationContext.DisplayName))); } }
public RequestContext(IDataAccessHelper helper, Dictionary <string, List <string> > remoteServices, Object data) : this() { DataHelper = helper; Data = data; RemoteServices = remoteServices; }
public RequestContext(IDataAccessHelper helper, ServiceCollection localServices, Object data) : this() { DataHelper = helper; Data = data; LocalServices = localServices; }
public AvaluoClienteCabService(IDataAccessHelper dataAccess, ITraceHelper traceHelper) { _dataAccess = dataAccess; _traceHelper = traceHelper; }
public WorkService(IDataAccessHelper dataAccess, ITraceHelper traceHelper) { _dataAccess = dataAccess; _traceHelper = traceHelper; }
public ProductService(IDataAccessHelper dataHelper) { _dataHelper = dataHelper; }
public LocationRepository(IDataAccessHelper dataAccessHelper) { _dataAccessHelper = dataAccessHelper; }
public BlogsController(IElasticBlogClient client, IDataAccessHelper helper) { _client = client; _helper = helper; }
public BlogsController(IElasticBlogClient client, IDataAccessHelper helper) { _client = client; _helper = helper; }
public UserService(IDataAccessHelper dataHelper, IConfiguration configuration) { _dataHelper = dataHelper; _configuration = configuration; }
public GetAccountsAndBalancesController(IDataAccessHelper dataAccess) { this._dataAccess = dataAccess; }
public ReadingRepository(IDataAccessHelper dataAccessHelper) { _dataAccessHelper = dataAccessHelper; }
public RequestContext(IDataAccessHelper helper, Object data) : this() { DataHelper = helper; Data = data; }