public static List <BusinessEntity.Biblio> LoadMAjorLibrary(string user) { List <BusinessEntity.Biblio> myList = new List <BusinessEntity.Biblio>(); using (bibliothequeEntities dbcontext = new bibliothequeEntities()) { foreach (var item in dbcontext.Select_BiblioPrincipale(user).ToList()) { BusinessEntity.Biblio biblio = new BusinessEntity.Biblio() { // code=item.Code, libellé = item, //id=item.id }; myList.Add(biblio); } } return(myList); }
public static List <BusinessEntity.Biblio> LoadAllLibrary() { List <BusinessEntity.Biblio> myList = new List <BusinessEntity.Biblio>(); using (bibliothequeEntities dbcontext = new bibliothequeEntities()) { List <SelectAll_Biblio_Result> maliste = dbcontext.SelectAll_Biblio().ToList(); foreach (var item in maliste) { BusinessEntity.Biblio biblio = new BusinessEntity.Biblio() { // code=item.Code, libellé = item.libellé, //id=item.id }; myList.Add(biblio); } } return(myList); }