protected override void OnModelCreating(DbModelBuilder modelBuilder)•{• modelBuilder.Entity<Student>()• .MapToStoredProcedures(p => p.Insert(sp => sp.HasName("sp_InsertStudent").Parameter(pm => pm.StudentName, "name").Result(rs => rs.StudentId, "Id"))• .Update(sp => sp.HasName("sp_UpdateStudent").Parameter(pm => pm.StudentName, "name"))• .Delete(sp => sp.HasName("sp_DeleteStudent").Parameter(pm => pm.StudentId, "Id"))• );•}
- 1 回答
- 0 关注
- 781 浏览
添加回答
举报
0/150
提交
取消