/// <summary>
        /// ثبت یک آیتم در این جدول
        /// </summary>
        /// <param name="model">مدلی که به این تابع باید پاس داده شود</param>
        /// <returns></returns>
        public async Task <SweetAlertExtenstion> InsertAsync(ProductGroupDependenciesInsertViewModel model)
        {
            try
            {
                var entity = Mapper.Map <ProductGroupDependencies>(model);
                await AddAsync(entity);

                return(SweetAlertExtenstion.Ok());
            }
            catch
            {
                return(SweetAlertExtenstion.Error());
            }
        }
 public async Task <IActionResult> Insert(ProductGroupDependenciesInsertViewModel model)
 {
     TempData.AddResult(await _productGroupDependenciesRepository.InsertAsync(model));
     return(Redirect(IndexUrlWithQueryString));
 }