示例#1
0
        public async Task <IHttpActionResult> CreateRegion([FromBody] Region entity)
        {
            try
            {
                await _RegionManager.CreateRegion(entity);

                return(Ok("Created"));
            }
            catch (Exception ex)
            {
                return(BadRequest(new SaveResult()
                {
                    StatusCode = HttpStatusCode.BadRequest,
                    Status = false,
                    Message = ex.Message
                }.ToString()));
            }
        }