public async Task <IActionResult> NewCollectionAsync([FromBody] CollectionInputModel model) { if (model == null) { return(BadRequest()); } if (!ModelState.IsValid) { return(new ValidateObjectResult(ModelState)); } var collection = Collection.New(model.CollectionName); var id = await _collectionRepository.AddCollectionAsync(collection); return(Ok(id)); }
public IActionResult CollectionComplex([FromBody] CollectionInputModel model) { return(Content($"Collection-Complex:{model.Values.Count()}")); }