-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStoreProcofEmployee.txt
36 lines (32 loc) · 943 Bytes
/
StoreProcofEmployee.txt
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
//1
string sql = @"CREATE PROCEDURE InsertAttendance
@ad DATETIME,
@intime TIME,
@outtime TIME,
@eid INT
AS
INSERT INTO
Attendances (AttendanceDate, InTime, OutTime, EmployeeId)
VALUES (@ad, @intime, @outtime, @eid)
RETURN 0";
migrationBuilder.Sql(sql);
//2
sql = @"CREATE PROCEDURE DeleteAttendanceOfEmployee
@eid INT
AS
DELETE Attendances
WHERE EmployeeId = @eid
RETURN 0";
migrationBuilder.Sql(sql);
//3
sql = @"CREATE PROCEDURE DeleteEmployee
@eid INT
AS
DELETE Employees
WHERE EmployeeId = @eid
RETURN 0";
migrationBuilder.Sql(sql);
==============<<<<<<<<<<<<<<<===================
migrationBuilder.Sql("DROP PROCEDURE InsertAttendance");
migrationBuilder.Sql("DROP PROCEDURE DeleteAttendanceOfEmployee");
migrationBuilder.Sql("DROP PROCEDURE DeleteEmployee");