3
Is it good practice to make use of domain class interfaces? Do I have an advantage in doing so? If so, which one?
Example:
public interface IAuditoria
{
long AuditoriaID { get; set; }
string Descricao { get; set; }
string SistemaOperacional { get; set; }
string ResolucaoTela { get; set; }
string ModeloDevice { get; set; }
string Navegador { get; set; }
string IPInternet { get; set; }
string Geolocalizacao { get; set; }
DateTime DataAuditoria { get; set; }
}
public class Auditoria : Entities.Bases.EntityBase, Entities.Interfaces.IAuditoria
{
public Auditoria()
{
}
#region Properties
public long AuditoriaID { get; set; }
public string Descricao { get; set; }
public string SistemaOperacional { get; set; }
public string ResolucaoTela { get; set; }
public string ModeloDevice { get; set; }
public string Navegador { get; set; }
public string IPInternet { get; set; }
public string Geolocalizacao { get; set; }
public DateTime DataAuditoria { get; set; }
}
I don’t see much point in using an interface in the domain class, following link that can help you a lot https://answall.com/questions/107524/como-e-quando-usar-interface
– Paulo Alexandre