Example #1
0
        public async Task <ActionResult <ProjectGetResponseModel> > Post([FromBody] ProjectCreateOrUpdateRequestModel value)
        {
            ValidationResult validationResult = await _validator.ValidateAsync(value);

            if (validationResult.IsValid)
            {
                return(await Task.FromResult(new ProjectGetResponseModel()));
            }

            return(BadRequest(validationResult));
        }
 public async Task <ProjectGetResponseModel> Put(int id, [FromBody] ProjectCreateOrUpdateRequestModel value)
 {
     value.Id = id;
     return(await _crudService.UpdateAsync(value));
 }
 public async Task <ProjectGetResponseModel> Post([FromBody] ProjectCreateOrUpdateRequestModel value)
 {
     return(await _crudService.CreateAsync(value));
 }