public override OptionBien Insert(OptionBien toInsert) { Dictionary <string, object> Parameters = MapToDico(toInsert); int id = base.Insert(Parameters); //TODO //toInsert.? = id; return(toInsert); }
//public IEnumerable<OptionBien> GetCountries() //{ // SelectAllCommand = "SELECT * FROM OptionBien ORDER BY Libelle"; // return base.getAll(Map); //} #region Mappers private Dictionary <string, object> MapToDico(OptionBien toInsert) { Dictionary <string, object> p = new Dictionary <string, object>(); p["idOption"] = toInsert.IdOption; //cela pourrait etre p.Add() p["idBien"] = toInsert.IdBien; p["Valeur"] = toInsert.Valeur; return(p); }
public override bool Update(OptionBien toUpdate) { Dictionary <string, object> Parameters = MapToDico(toUpdate); return(base.Update(Parameters)); }