예제 #1
0
        public async Task <IActionResult> DeleteMajor(int id)
        {
            var major = await repository.GetMajor(id, includeRelated : false);

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

            repository.RemoveMajor(major);
            await unitOfWork.Complete();

            return(Ok(id));
        }