-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdb.Context.cs
59 lines (49 loc) · 2.3 KB
/
db.Context.cs
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Biblioteca
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Core.Objects;
using System.Linq;
public partial class BibliotecaEntities : DbContext
{
public BibliotecaEntities()
: base("name=BibliotecaEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<Book> Book { get; set; }
public virtual DbSet<User> User { get; set; }
public virtual ObjectResult<books_login_Result> books_login(string username, string password)
{
var usernameParameter = username != null ?
new ObjectParameter("username", username) :
new ObjectParameter("username", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("password", password) :
new ObjectParameter("password", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<books_login_Result>("books_login", usernameParameter, passwordParameter);
}
public virtual ObjectResult<login_books_Result> login_books(string username, string password)
{
var usernameParameter = username != null ?
new ObjectParameter("username", username) :
new ObjectParameter("username", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("password", password) :
new ObjectParameter("password", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<login_books_Result>("login_books", usernameParameter, passwordParameter);
}
}
}