摘要:
都是通过循环才能找到具体的错误信息具体方法参见这两篇文章:EntityFrameWork:http://www.cnblogs.com/shouzheng/archive/2012/04/19/2456817.html关键部分 1 string error = string.Empty; 2 using (var blog = new Blog()) 3 { 4 Author author = new Author 5 { 6 Name = "ErrorNameForTest" 7 }; 8 blog.Authors.Add(author); 9... 阅读全文