You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to build an Nancy OData support app using LinqToQuerystring. I got below sample code. it is working for any query url like: http:/test/?$filter=Recommendede eq true. variable tests holding right query result but i am finding difficulty in converting the result(tests) into Json response.
thanks in advance.
Get["/test"] = _ =>
var tests =
new List
{
new Movie
{
Title = "Matrix (The)",
ReleaseDate = new DateTime(1999, 3, 31),
DurationInMinutes = 136,
MetaScore = 73,
Director = "Wachowski Brothers",
Recommended = true
},
new Movie
{
Title = "Avatar",
ReleaseDate = new DateTime(2009, 12, 17),
DurationInMinutes = 162,
MetaScore = 83,
Director = "James Cameron",
Recommended = false
Hi, I am trying to build an Nancy OData support app using LinqToQuerystring. I got below sample code. it is working for any query url like: http:/test/?$filter=Recommendede eq true. variable tests holding right query result but i am finding difficulty in converting the result(tests) into Json response.
thanks in advance.
Get["/test"] = _ =>
var tests =
new List
{
new Movie
{
Title = "Matrix (The)",
ReleaseDate = new DateTime(1999, 3, 31),
DurationInMinutes = 136,
MetaScore = 73,
Director = "Wachowski Brothers",
Recommended = true
},
new Movie
{
Title = "Avatar",
ReleaseDate = new DateTime(2009, 12, 17),
DurationInMinutes = 162,
MetaScore = 83,
Director = "James Cameron",
Recommended = false
The text was updated successfully, but these errors were encountered: