-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyCarDbContext.cs
28 lines (26 loc) · 1.03 KB
/
MyCarDbContext.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
using Entities.Concrete;
using Core.Entities.Concrete;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
namespace DataAccess.Concrete.EntityFramework
{
public class MyCarDbContext:DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server=4EACHT\SQLEXPRESS;Database=CarRentalDb;Trusted_Connection=true");
}
public DbSet<Car> Cars { get; set; }
public DbSet<Brand> Brands { get; set; }
public DbSet<Color> Colors { get; set; }
public DbSet<User> Users { get; set; }
public DbSet<Customer> Customers { get; set; }
public DbSet<Rental> Rentals { get; set; }
public DbSet<CarImage> CarImages { get; set; }
public DbSet<OperationClaim> OperationClaims { get; set; }
public DbSet<UserOperationClaim> UserOperationClaims { get; set; }
public DbSet<CreditCard> CreditCards { get; set; }
}
}