We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a889428 commit dba6ebeCopy full SHA for dba6ebe
src/Backbone.Todos/Global.asax.cs
@@ -22,12 +22,12 @@ public class TodoService : RestServiceBase<Todo>
22
23
public override object OnGet(Todo request)
24
{
25
- //return all todos
26
- if (request.Id == default(long))
27
- return RedisManager.ExecAs<Todo>(r => r.GetAll());
28
-
29
//return single todo
30
- return RedisManager.ExecAs<Todo>(r => r.GetById(request.Id));
+ if (request.Id != default(long))
+ return RedisManager.ExecAs<Todo>(r => r.GetById(request.Id));
+
+ //return all todos
+ return RedisManager.ExecAs<Todo>(r => r.GetAll());
31
}
32
33
//Handles creaing a new and updating existing todo
0 commit comments