Product.cs 887 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using sql_pagining.models;
  7. using Dapper;
  8. using MySqlConnector;
  9. namespace sql_pagining.models
  10. {
  11. public class Product
  12. {
  13. public int ID { get; set; }
  14. public string Title { get; set; }
  15. public string ArticleNumber { get; set; }
  16. public int ProductTypeID { get; set; }
  17. public string ProductTypeTitle { get; set; }
  18. public double? MaterialCost { get; set; }
  19. public string? MaterialString { get; set; }
  20. public string? Image { get; set; }
  21. public Uri? ImageNaruto
  22. {
  23. get
  24. {
  25. var imageName = Environment.CurrentDirectory + (Image ?? "");
  26. return System.IO.File.Exists(imageName) ? new Uri(imageName) : null;
  27. }
  28. }
  29. }
  30. }