forked from JSONAPIdotNET/JSONAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguration.cs
More file actions
37 lines (35 loc) · 974 Bytes
/
Configuration.cs
File metadata and controls
37 lines (35 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Data.Entity.Migrations;
using JSONAPI.TodoMVC.API.Models;
namespace JSONAPI.TodoMVC.API.Migrations
{
internal sealed class Configuration : DbMigrationsConfiguration<TodoMvcContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
}
protected override void Seed(TodoMvcContext context)
{
context.Todos.AddOrUpdate(
new Todo
{
Id = "1",
Text = "Do the dishes",
IsCompleted = false
},
new Todo
{
Id = "2",
Text = "Do the laundry",
IsCompleted = true
},
new Todo
{
Id = "3",
Text = "Walk the dog",
IsCompleted = false
}
);
}
}
}