using MySqlConnector; namespace uWine.Core.Domain.Entities { public class Contact { public int Id { get; set; } public ContactType ContactType { get; set; } public string Value { get; set; } public int Priority { get; set; } public string Notes { get; set; } public DateTime CreationDate { get; set; } public DateTime? UpdateDate { get; set; } public bool Active { get; set; } public static Contact FromRecord(MySqlDataReader reader) { return new Contact { Id = reader.GetInt32("id"), Value = reader.GetString("contact"), Priority = reader.GetInt32("priority"), Notes = reader.GetString("note"), CreationDate = reader.GetDateTime("creation_date"), UpdateDate = reader.GetDateTime("update_date"), }; } } }