creazione primi repository e interfacce
This commit is contained in:
1 parent
b7983dae8e
commit
0a6744e8b0
19 files changed
+644
-39
No files matched your search
@@ -1,4 +1,6 @@
|
||||
namespace uWine.Core.Domain.Entities
|
||||
using MySqlConnector;
|
||||
|
||||
namespace uWine.Core.Domain.Entities
|
||||
{
|
||||
public class Contact
|
||||
{
|
||||
@@ -8,8 +10,20 @@
|
||||
public int Priority { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
public DateTime? UpdatedDate { 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"),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user