TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Request.CreateResponse Error
Oct 22 2013 3:22 PM
I am getting an error below in red, I am not for sure why. I am using Project MVC4 project (API Controller):
Error I am getting:
Error
The type arguments for method 'System.Net.Http.HttpRequestMessageExtensions.CreateResponse<T>(System.Net.Http.HttpRequestMessage, System.Net.HttpStatusCode, T)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
var ret = new
{
CommentedBy = postcomment.CommentedBy,
CommentedByName = usr.Fullname,
//CommentedByAvatar = imgFolder + (String.IsNullOrEmpty(usr.AvatarExt) ? defaultAvatar : postcomment.CommentedBy + "." + postcomment.UserProfile.AvatarExt),
CommentedByAvatar = imgFolder + (String.IsNullOrEmpty(usr.AvatarExt) ? defaultAvatar : postcomment.CommentedBy + "." + postcomment.UserProfile.AvatarExt),
CommentedDate = postcomment.CommentedDate,
CommentId = postcomment.CommentId,
Message = postcomment.Message,
PostId = postcomment.PostId
};
HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, ret);
Reply
Answers (
0
)
embed exe files to the project and run it
Please help with an array.