public async Task <IHttpActionResult> AddCollection(string name) { try { var result = await _service.AddCollection(name); return(Ok(result)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public Task <int> CreateCollection([FromBody] string name) { System.Console.WriteLine($"Trying to add name: <<{name}>>"); return(_dataService.AddCollection(name)); }