Example #1
0
        public async Task <IActionResult> Post([FromBody] Movie value)
        {
            using (var ct = new MoviesDataController())
            {
                Guid?id = await ct.CreateMovieAsync(value);

                if (id.HasValue)
                {
                    return(Ok(new { id = id.ToString() }));
                }
                else
                {
                    return(Conflict());
                }
            }
        }