internal static H_PJ ToHelper(this B_PJ entity) { return(new H_PJ() { Id = entity.Id, Nom = entity.Nom, Sexe = entity.Sexe, Blesse = entity.Blesse, Esquive = entity.Esquive, CoupPuissant = entity.CoupPuissant, Id_Race = entity.Id_Race, Id_Classe = entity.Id_Classe, Id_Signe = entity.Id_Signe, ValeurD4 = entity.ValeurD4 }); }
static void Main(string[] args) { B_PJService b_PJService = new B_PJService(); B_PJ b_PJ = new B_PJ(); b_PJ = b_PJService.Get(1); b_PJ.Details = b_PJService.GetAll(1).ToList(); Console.WriteLine("{0}{1}", b_PJ.Nom, b_PJ.Sexe); foreach (B_PJDetails item in b_PJ.Details) { Console.WriteLine("{0}{1}", item.Nom, item.Valeur); } Console.ReadLine(); Console.WriteLine("test"); }
public IEnumerable <B_PJDetails> GetAll(int id) { B_PJ PJ = Mapper <PJ, B_PJ> .Map(pjrepo.Get(id)); return(PJ.Details = (repo.GetAll(PJ.Id).ToList()).ToBusiness()); }
// PUT: api/PJ/5 public void Put(int id, [FromBody] B_PJ value) { pjService.Update(id, value); }
// POST: api/PJ public void Post([FromBody] B_PJ value) { pjService.Insert(value); }