Agregar archivos de proyecto.
This commit is contained in:
31
MieSystem/Data/Mapper.cs
Normal file
31
MieSystem/Data/Mapper.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using MieSystem.Models;
|
||||
|
||||
namespace MieSystem.Data
|
||||
{
|
||||
public static class Mapper
|
||||
{
|
||||
|
||||
public static Expediente MapFromDictionary(IDictionary<string, object> dict)
|
||||
{
|
||||
return new Expediente
|
||||
{
|
||||
Id = Convert.ToInt32(dict["id"]),
|
||||
Nombre = dict["nombre"]?.ToString(),
|
||||
Apellidos = dict["apellidos"]?.ToString(),
|
||||
FechaNacimiento = Convert.ToDateTime(dict["fecha_nacimiento"]),
|
||||
NombrePadre = dict["nombre_padre"]?.ToString(),
|
||||
NombreMadre = dict["nombre_madre"]?.ToString(),
|
||||
NombreResponsable = dict["nombre_responsable"]?.ToString(),
|
||||
ParentescoResponsable = dict["parentesco_responsable"]?.ToString(),
|
||||
Sexo = dict["sexo"]?.ToString(),
|
||||
Direccion = dict["direccion"]?.ToString(),
|
||||
Telefono = dict["telefono"]?.ToString(),
|
||||
Observaciones = dict["observaciones"]?.ToString(),
|
||||
FotoUrl = dict["foto_url"]?.ToString(),
|
||||
FechaCreacion = Convert.ToDateTime(dict["fecha_creacion"]),
|
||||
FechaActualizacion = Convert.ToDateTime(dict["fecha_actualizacion"]),
|
||||
Activo = Convert.ToBoolean(dict["activo"])
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user