public async Task <IActionResult> CreateVideo(VideoMaterialVM videoMaterialVM)
        {
            if (!ModelState.IsValid && await materialService.UniqueMaterialName(videoMaterialVM.Name))
            {
                return(View("CreateVideo", videoMaterialVM));
            }

            var mappedVideo = mapper.Map <VideoMaterialVM, VideoMaterial>(videoMaterialVM);

            await videoMaterialService.AddVideoMaterial(mappedVideo);

            return(RedirectToAction("MaterialList", "Material"));
        }
        public VideoMaterialVM VideoCreate()
        {
            var videoVM = materialHelper.VideoFullData();

            if (validations.Validate(videoVM).IsValid&& videoValidator.Validate(videoVM).IsValid)
            {
                var mappedVideo = mapper.Map <VideoMaterialVM, VideoMaterial>(videoVM);
                videoMaterialService.AddVideoMaterial(mappedVideo);
                Dye.Succsess();
                Console.WriteLine("You have add video");
                Console.ResetColor();
                return(videoVM);
            }
            else
            {
                Dye.Fail();
                Console.WriteLine(videoValidator.Validate(videoVM) + " " + " " + validations.Validate(videoVM));
                Console.ResetColor();
                VideoCreate();
                return(null);
            }
        }