예제 #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));
 }