public List<AppTO> findAll() { List<AppTO> appsTO = new List<AppTO>(); using (wamEntities db = new wamEntities()) { var apps = from app in db.Application select app; foreach (var app in apps) { AppTO appTO = new AppTO(); appTO.name = app.name; appTO.id = app.Id; appsTO.Add(appTO); } } return appsTO; }
public List <AppTO> findAll() { List <AppTO> appsTO = new List <AppTO>(); using (wamEntities db = new wamEntities()) { var apps = from app in db.Application select app; foreach (var app in apps) { AppTO appTO = new AppTO(); appTO.name = app.name; appTO.id = app.Id; appsTO.Add(appTO); } } return(appsTO); }