forked from VeronicaWasson/BookService
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBookServiceContext.cs
More file actions
28 lines (23 loc) · 945 Bytes
/
BookServiceContext.cs
File metadata and controls
28 lines (23 loc) · 945 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
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace BookService.Models
{
public class BookServiceContext : DbContext
{
// You can add custom code to this file. Changes will not be overwritten.
//
// If you want Entity Framework to drop and regenerate your database
// automatically whenever you change your model schema, please use data migrations.
// For more information refer to the documentation:
// http://msdn.microsoft.com/en-us/data/jj591621.aspx
public BookServiceContext() : base("name=BookServiceContext")
{
this.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
}
public System.Data.Entity.DbSet<BookService.Models.Author> Authors { get; set; }
public System.Data.Entity.DbSet<BookService.Models.Book> Books { get; set; }
}
}