コード例 #1
0
        public async Task <IActionResult> DeleteActivity(Guid ActivityId)
        {
            int result = 0;

            if (ActivityId == null)
            {
                return(BadRequest());
            }

            try
            {
                result = await activityRepo.DeleteActivityInfo(ActivityId);

                if (result == 0)
                {
                    return(NotFound());
                }
                return(Ok());
            }
            catch (Exception excp)
            {
                return(BadRequest(excp));
            }
        }