You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
545 B

2 years ago
  1. namespace SqlSugar
  2. {
  3. public class MySqlInsertBuilder : InsertBuilder
  4. {
  5. public override string SqlTemplate
  6. {
  7. get
  8. {
  9. if (IsReturnIdentity)
  10. {
  11. return @"INSERT INTO {0}
  12. ({1})
  13. VALUES
  14. ({2}) ;SELECT LAST_INSERT_ID();";
  15. }
  16. else
  17. {
  18. return @"INSERT INTO {0}
  19. ({1})
  20. VALUES
  21. ({2}) ;";
  22. }
  23. }
  24. }
  25. }
  26. }