1
+ using System ;
2
+ using CodeFirst . DataAccess . Models ;
3
+ using Microsoft . EntityFrameworkCore ;
4
+ using Microsoft . EntityFrameworkCore . Metadata . Builders ;
5
+
6
+ namespace CodeFirst . DataAccess . Configurations ;
7
+
8
+ public class ActorsConfiguration : IEntityTypeConfiguration < Actors >
9
+ {
10
+ public void Configure ( EntityTypeBuilder < Actors > builder )
11
+ {
12
+ builder . HasKey ( e => e . ActorId )
13
+ . HasName ( "actor_pkey" ) ;
14
+ builder . Property ( e => e . ActorId )
15
+ . HasColumnName ( "actor_id" ) ;
16
+ builder . Property ( e => e . Firstname )
17
+ . HasColumnName ( "first_name" ) ;
18
+ builder . Property ( e => e . Lastname )
19
+ . HasColumnName ( "last_name" ) ;
20
+ builder . Property ( e => e . Birthday )
21
+ . HasColumnName ( "birthday" ) ;
22
+ builder . ToTable ( "actors" ) ;
23
+
24
+ builder . HasData (
25
+ new Actors ( 1 , "Arnold" , "Schwarzenegger" , Convert . ToDateTime ( "1947-07-30" ) ) ,
26
+ new Actors ( 2 , "Anthony" , "Daniels" , Convert . ToDateTime ( "1946-02-21" ) ) ,
27
+ new Actors ( 3 , "Harrison" , "Ford" , Convert . ToDateTime ( "1942-07-13" ) ) ,
28
+ new Actors ( 4 , "Carrie" , "Fisher" , Convert . ToDateTime ( "1956-10-21" ) ) ,
29
+ new Actors ( 5 , "Alec" , "Guiness" , Convert . ToDateTime ( "1914-04-02" ) ) ,
30
+ new Actors ( 6 , "Peter" , "Cushing" , Convert . ToDateTime ( "1913-05-26" ) ) ,
31
+ new Actors ( 7 , "David" , "Prowse" , Convert . ToDateTime ( "1944-05-19" ) ) ,
32
+ new Actors ( 8 , "Peter" , "Mayhew" , Convert . ToDateTime ( "1935-07-01" ) ) ,
33
+ new Actors ( 9 , "Michael" , "Biehn" , Convert . ToDateTime ( "1956-07-31" ) ) ,
34
+ new Actors ( 10 , "Linda" , "Hamilton" , Convert . ToDateTime ( "1956-09-26" ) ) ,
35
+ new Actors ( 11 , "Bill" , "Murray" , Convert . ToDateTime ( "1950-09-21" ) ) ,
36
+ new Actors ( 12 , "Dan" , "Aykroyd" , Convert . ToDateTime ( "1952-07-01" ) ) ,
37
+ new Actors ( 13 , "Sigourney" , "Weaver" , Convert . ToDateTime ( "1949-10-08" ) ) ,
38
+ new Actors ( 14 , "Robert" , "De Niro" , Convert . ToDateTime ( "1943-08-17" ) ) ,
39
+ new Actors ( 15 , "Jodie" , "Foster" , Convert . ToDateTime ( "1962-11-19" ) ) ,
40
+ new Actors ( 16 , "Harvey" , "Keitel" , Convert . ToDateTime ( "1939-05-13" ) ) ,
41
+ new Actors ( 17 , "Cybill" , "Shepherd" , Convert . ToDateTime ( "1950-02-18" ) ) ,
42
+ new Actors ( 18 , "Tom" , "Berenger" , Convert . ToDateTime ( "1949-05-31" ) ) ,
43
+ new Actors ( 19 , "Willem" , "Dafoe" , Convert . ToDateTime ( "1955-07-22" ) ) ,
44
+ new Actors ( 20 , "Charlie" , "Sheen" , Convert . ToDateTime ( "1965-09-03" ) ) ,
45
+ new Actors ( 21 , "Harrison" , "Ford" , Convert . ToDateTime ( "1942-07-13" ) ) ,
46
+ new Actors ( 22 , "Emmanuelle" , "Seigner" , Convert . ToDateTime ( "1966-06-22" ) ) ,
47
+ new Actors ( 23 , "Jean" , "Reno" , Convert . ToDateTime ( "1948-07-30" ) ) ,
48
+ new Actors ( 24 , "Billy" , "Crystal" , Convert . ToDateTime ( "1948-03-14" ) ) ,
49
+ new Actors ( 25 , "Lisa" , "Kudrow" , Convert . ToDateTime ( "1963-07-30" ) ) ,
50
+ new Actors ( 26 , "Gary" , "Oldman" , Convert . ToDateTime ( "1958-03-21" ) ) ,
51
+ new Actors ( 27 , "Natalie" , "Portman" , Convert . ToDateTime ( "1981-06-09" ) ) ,
52
+ new Actors ( 28 , "Tom" , "Cruise" , Convert . ToDateTime ( "1962-07-03" ) ) ) ;
53
+ }
54
+ }
0 commit comments