You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
831 B

using Entity_Framework.Entity;
using Modele.Classe;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity_Framework.Factories
{
public static class SessionFactorie
{
public static Session EntityToModele(this Sessions entity)
{
return new Session(IdArg:entity.Id,dateArg:entity.Date,nameArg: entity.Name, typeArg: entity.Type, nameCircuitArg: entity.Circuit.Name, namePiloteArg: entity.Pilote.Pseudo);
}
public static Sessions ModeleToEntity(this Session modele)
{
Sessions entity = new Sessions();
entity.Name = modele.name;
entity.Type = modele.type;
entity.Date = modele.date;
return entity;
}
}
}