public TaskRequestValidatior() { tableCli = new TableCli(AzureStorageConnection.Instance(), "Projects"); RuleFor(t => t.Name) .NotEmpty() .MinimumLength(5) .MaximumLength(25); RuleFor(t => t.Description) .NotEmpty() .MinimumLength(10) .MaximumLength(200); RuleFor(t => t.ProjectId) .Must(id => id.Contains("$")) .WithMessage("Not a valid ID") .DependentRules(() => { RuleFor(p => p).Must(p => tableCli.EntityExists(p.ProjectId.Split('$')[0], p.ProjectId.Split('$')[1])) .WithMessage(p => $"Project with id '{p.ProjectId}' not found."); }); }
public TableCliUpdateProjectAsync(IMapper mapper) { _tableCli = new TableCli(AzureStorageConnection.Instance(), "Projects");; _mapper = mapper; }
public LinqGetProject(IMapper mapper) { _mapper = mapper; _tableCli = new TableCli(AzureStorageConnection.Instance(), "Projects"); }
public TableCliCreateTaskAsync(TaskRequestValidatior validator) { _tableCli = new TableCli(AzureStorageConnection.Instance(), "Tasks"); _validatior = validator; }
public LinqGetTask(IMapper mapper) { _mapper = mapper; _tableCli = new TableCli(AzureStorageConnection.Instance(), "Tasks"); }
public TableCliDeleteTaskAsync(IMapper mapper) { _mapper = mapper; _tableCli = new TableCli(AzureStorageConnection.Instance(), "Tasks"); }
public TableCliQueryProject(IMapper mapper) { _tableCli = new TableCli(AzureStorageConnection.Instance(), "Projects"); _mapper = mapper; }
public TableCliUpdateTaskAsync(IMapper mapper, TaskRequestValidatior validator) { _tableCli = new TableCli(AzureStorageConnection.Instance(), "Tasks");; _mapper = mapper; _validator = validator; }
public TableCliCreateProject(ProjectRequestValidator validator) { _tableCli = new TableCli(AzureStorageConnection.Instance(), "Projects"); _validator = validator; }