Created
December 2, 2011 11:50
-
-
Save gideondsouza/1422975 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ObservableHelper<T> : IObservableHelper<T, Database1Entities> | |
where T : class //or EntityObject | |
{ | |
public ObservableHelper() | |
{ | |
_dat = new Database1Entities(); | |
} | |
Database1Entities _dat; | |
public IObservable<IList<T>> GetAllAsObservables(Func<Database1Entities, IQueryable<T>> funcquery) | |
{ | |
var getall = Observable.ToAsync<Database1Entities, IQueryable<T>>(funcquery); | |
return getall(_dat).Select(x => x.ToList()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment