Exemplo n.º 1
0
        public async Task <IHttpActionResult> Add(Sample sample)
        {
            var result = await Task.Run(() => _sampleService.Insert(sample));

            _memCache.Delete(_key);

            if (result == 0)
            {
                return(BadRequest());
            }

            return(Ok(new BaseResponse <string>
            {
                IsSuccess = true,
                Message = HttpResponseCode.OK.GetDescription()
            }));
        }