コード例 #1
0
        public IActionResult Delete([FromRoute] Guid courseEntityId)
        {
            var result = _courseLogic.Delete(courseEntityId);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }
コード例 #2
0
        public async Task <IActionResult> Delete(int id)
        {
            LogicResponse response = new LogicResponse();

            response = _courseLogic.Delete(id);
            if (response.Success)
            {
                return(Ok(id));
            }
            else
            {
                return(BadRequest(response.Message));
            }
        }