コード例 #1
0
 static void AddEmp_Tsp()
 {
     DAL.CodeFirsApproaches.EmpInfo emp = new DAL.CodeFirsApproaches.EmpInfo
     {
         Name = "ashok",
         Salary = 12000
     };
     emp.EmpContacInformation = new DAL.CodeFirsApproaches.EmpContactInfo {
         MobileNo = "9550937878",
         Emailid = "*****@*****.**"
     };
     codeFirstOperations.Tsp_AddEmp(emp);
 }
コード例 #2
0
 public void Tsp_AddEmp(EmpInfo emp)
 {
     using (var context = new TblSplitContext())
     {
         context.EmpInfos.Add(emp);
         context.SaveChanges();
     }
 }