TableOperationRecordRepository.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using AutoMapper;
  2. using OASystem.Domain.Entities.Customer;
  3. using OASystem.Domain.ViewModels.CRM;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace OASystem.Infrastructure.Repositories.CRM
  10. {
  11. /// <summary>
  12. /// 表操作记录
  13. /// </summary>
  14. public class TableOperationRecordRepository : BaseRepository<Crm_TableOperationRecord, TableOperationRecordView>
  15. {
  16. private readonly IMapper _mapper;
  17. public TableOperationRecordRepository(SqlSugarClient sqlSugar, IMapper mapper) :
  18. base(sqlSugar)
  19. {
  20. this._mapper = mapper;
  21. }
  22. /// <summary>
  23. /// 添加
  24. /// </summary>
  25. /// <param name="_TableOperationRecord"></param>
  26. /// <returns></returns>
  27. public async Task<bool> _Add(Crm_TableOperationRecord _TableOperationRecord)
  28. {
  29. var add = await _sqlSugar.Insertable(_TableOperationRecord).ExecuteCommandAsync();
  30. if (add > 0)
  31. {
  32. return true;
  33. }
  34. return false;
  35. }
  36. }
  37. }