Ejemplo n.º 1
0
 /// <summary>
 /// [Chuc.Nguyen] - Xóa dữ liệu theo điều kiện sử dụng Store
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="condition"></param>
 /// <param name="storeName"></param>
 /// <returns></returns>
 public string DeleteData <TEntity>(ListQueryModel condition, string storeName) where TEntity : class
 {
     using (var context = new VnrHrmDataContext())
     {
         var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
         var repo       = new CustomBaseRepository <TEntity>(unitOfWork);
         try
         {
             return(repo.DeleteData(condition, storeName));
         }
         catch (Exception ex)
         {
             return(NotificationType.Error + "," + ex.Message);
         }
     }
 }