RefTaskFreqRepository.cs 979 B

123456789101112131415161718192021222324252627282930313233343536
  1. using DW5S.Entity;
  2. using Microsoft.AspNetCore.Mvc.RazorPages;
  3. using Microsoft.EntityFrameworkCore;
  4. using System;
  5. using System.Collections;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Linq.Expressions;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace DW5S.Repostory
  13. {
  14. /// <summary>
  15. ///
  16. /// </summary>
  17. public class RefTaskFreqRepository : Repository<RefTaskFreq>
  18. {
  19. public RefTaskFreqRepository(OracleContext ctx)
  20. : base(ctx)
  21. {
  22. }
  23. /// <summary>
  24. /// 修改RefTaskFreq Enable
  25. /// </summary>
  26. /// <param name="satCode"></param>
  27. /// <returns></returns>
  28. public async Task<int> UpdateEnableAsync(bool enable, Expression<Func<RefTaskFreq, bool>> predicate = null)
  29. {
  30. return await dbSet.Where(predicate)
  31. .ExecuteUpdateAsync(setters => setters.SetProperty(b => b.Enable, enable));
  32. }
  33. }
  34. }