15,890,741 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Agnib Pyne 2022 (Top 9 by date)
Agnib Pyne 2022
3-Mar-23 8:58am
View
Someone posted something related to this and it was quite detailed, which might be helpful. Cannot be able to see that content anymore. Please share it again. I think the member name was showing something starting with 150****, not sure though.
Agnib Pyne 2022
23-Feb-23 0:44am
View
Thanks Richard. I will go through the content and it will surely help me out.
Agnib Pyne 2022
7-Feb-23 6:13am
View
Okay. Yes it worked now.
Thanks a lot.
Agnib Pyne 2022
7-Feb-23 6:01am
View
Yes, so can I change the return type of GetProductTypes to Task<actionresult<ienumerable<..>>>
Or how to wrap the result in Ok(...) call?
Agnib Pyne 2022
7-Feb-23 5:25am
View
I am using .NET version 6.0.401 for this project.
Agnib Pyne 2022
7-Feb-23 4:57am
View
Yes. Can I mark the async method (GetProductTypes()) as Task<actionresult<ienumerable>> too? If not, then can I mark [HttpGet] method as Task<ienumerable<...>> only since am not using any HttpResponseMessage within the [HttpGet] method. I am just returning the data to the UI and dispaying it.
But, if I have to use HttpResponseMessage as well then ActinResult is needed. In that case, what needs to be done?
Agnib Pyne 2022
7-Feb-23 4:56am
View
Awaited task returns 'interface System.Collections.Generic.IEnumerable<out t="">'
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
T is ProductTypesData
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<api.classes.producttypesdata>' to 'Microsoft.AspNetCore.Mvc.ActionResult<system.collections.generic.ienumerable<api.classes.producttypesdata>>' [API]csharp(CS0029)
There are 2 error messages, one is the same as earlier one so I didn't post that.
But now I have mentioned the full error messages
Agnib Pyne 2022
7-Feb-23 4:32am
View
Yes. Can I mark the async method (GetProductTypes()) as Task<actionresult<ienumerable>> too? If not, then can I mark [HttpGet] method as Task<ienumerable<...>> only since am not using any HttpResponseMessage within the [HttpGet] method. I am just returning the data to the UI and dispaying it.
Agnib Pyne 2022
7-Feb-23 4:30am
View
While trying the above solution, am getting another error:
Awaited task returns 'interface System.Collections.Generic.IEnumerable<out t="">'
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
T is ProductTypesData
Show More