creazione entities e primi repository

This commit is contained in:
Riccardo Usardi committed 2025-07-04 15:32:04 +02:00
1 parent 9036616a59
commit b7983dae8e
22 files changed
+601 -21

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
using MySqlConnector;
namespace uWine.Core.Domain.Entities
{
public class Address
{
public int Id { get; set; }
public string Country { get; set; }
public string PostalCode { get; set; }
public string County { get; set; }
public string Province { get; set; }
public string City { get; set; }
public string Street { get; set; }
public string HouseNumber { get; set; }
public decimal Latitude { get; set; }
public decimal Longitude { get; set; }
public bool Active { get; set; }
public static Address FromRecord(MySqlDataReader reader)
{
return new Address
{
Id = reader.GetInt32("id"),
Country = reader.GetString("country"),
PostalCode = reader.GetString("postal_code"),
County = reader.GetString("county"),
Province = reader.GetString("province"),
City = reader.GetString("city"),
Street = reader.GetString("street"),
HouseNumber = reader.GetString("house_number"),
Latitude = reader.GetDecimal("latitude"),
Longitude = reader.GetDecimal("longitude"),
Active = reader.GetBoolean("active")
};
}
}
}