Skip to content

Commit

Permalink
Rename TodoContextProvider with TodoRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
wardbell committed Jan 28, 2013
1 parent b02f269 commit e75b735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Samples/NoDb/NoDb/Controllers/TodoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ namespace NoDb.Controllers {
[BreezeController]
public class TodoController : ApiController
{
private readonly TodoContextProvider _context;
private readonly TodoRepository _repository;

public TodoController() {
_context = new TodoContextProvider();
_repository = new TodoRepository();
}

// GET ~/api/BreezeTodo/TodoList
[HttpGet]
public IQueryable<TodoList> TodoLists()
{
return _context.TodoLists
return _repository.TodoLists
.OrderByDescending(t => t.TodoListId);
}

// POST ~/api/BreezeTodo/SaveChanges
[HttpPost]
public SaveResult SaveChanges(JObject saveBundle)
{
return _context.SaveChanges(saveBundle);
return _repository.SaveChanges(saveBundle);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
using Breeze.WebApi;

namespace NoDb.Models {
public class TodoContextProvider : ContextProvider {
public class TodoRepository : ContextProvider {

public TodoContext Context { get { return TodoContext.Instance; } }
private TodoContext Context { get { return TodoContext.Instance; } }

/// <summary>Get all TodoLists</summary>
/// <remarks>Could have returned an IEnumerable.</remarks>
Expand Down
2 changes: 1 addition & 1 deletion Samples/NoDb/NoDb/NoDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<Compile Include="App_Start\BreezeWebApiConfig.cs" />
<Compile Include="Controllers\TodoController.cs" />
<Compile Include="Models\TodoContext.cs" />
<Compile Include="Models\TodoContextProvider.cs" />
<Compile Include="Models\TodoRepository.cs" />
<Compile Include="Models\TodoItem.cs" />
<Compile Include="Models\TodoList.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down

0 comments on commit e75b735

Please sign in to comment.