コード例 #1
0
        public async Task <IHttpActionResult> AddCollection(string name)
        {
            try
            {
                var result = await _service.AddCollection(name);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
コード例 #2
0
 public Task <int> CreateCollection([FromBody] string name)
 {
     System.Console.WriteLine($"Trying to add name: <<{name}>>");
     return(_dataService.AddCollection(name));
 }