public async Task <IActionResult> InsertOnGrid(string values)
        {
            var video = new Resource_Video();

            JsonConvert.PopulateObject(values, video);
            var model = await _videoService.AddAsync(video);

            return(Ok(model));
        }
        public async Task <IActionResult> InsertOnGrid(string values)
        {
            var video = new Resource_Video();

            JsonConvert.PopulateObject(values, video);
            if (!TryValidateModel(video))
            {
                return(BadRequest(ModelState.GetFullErrorMessage()));
            }
            var model = await _videoService.AddAsync(video);

            return(Ok(model));
        }
 public Task <Resource_Video> DeleteAsync(Resource_Video entity)
 {
     return(_videoRepository.DeleteAsync(entity));
 }
 public Task <Resource_Video> AddAsync(Resource_Video entity)
 {
     return(_videoRepository.AddAsync(entity));
 }
        public async Task <IActionResult> DeleteAsync([FromBody] Resource_Video video)
        {
            var model = await _videoService.DeleteAsync(video);

            return(Ok(model));
        }