Closed nicomara closed 1 year ago
Hi, why occur "invalid cast" exception here: client = new WordPressClient(UriString); //fix casting exception var listOfNews = (IEnumerable<Post>)InitPosts(); listOfPosts = new ObservableCollection<Post>(listOfNews); } public async Task<IEnumerable<Post>> InitPosts() { var posts = await client.Posts.GetAllAsync(); return await Task.FromResult(posts); } What's wrong with post type? This code come from .Net MAUI app. Thanks.
client = new WordPressClient(UriString); //fix casting exception var listOfNews = (IEnumerable<Post>)InitPosts(); listOfPosts = new ObservableCollection<Post>(listOfNews); }
public async Task<IEnumerable<Post>> InitPosts() { var posts = await client.Posts.GetAllAsync(); return await Task.FromResult(posts); }
this seems like not an issue with this library.
Hi, why occur "invalid cast" exception here:
client = new WordPressClient(UriString); //fix casting exception var listOfNews = (IEnumerable<Post>)InitPosts(); listOfPosts = new ObservableCollection<Post>(listOfNews); }
public async Task<IEnumerable<Post>> InitPosts() { var posts = await client.Posts.GetAllAsync(); return await Task.FromResult(posts); }
What's wrong with post type? This code come from .Net MAUI app. Thanks.