实体数据模型错误

编程入门 行业动态 更新时间:2024-10-26 22:19:03
本文介绍了实体数据模型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 先生!.... 我是这个话题的新手! 我已经编写了edms的代码,但它给出了例外..... 有2个文件program.cs: 使用System; 使用System.Collections.Generic; 使用System.Linq; 使用System.Data.Entity; 使用System.Data; 使用System.Data.SqlClient; 使用System.Text; 使用BusinessObjects; namespace EntityFramework_demo { class program { public static void test_App() { certificationEntities cer = new certificationEntities(); Emp em = new Emp(); em.ID = 3; em.Name =niitin; em.Age = 23; cer.AddObject(nitin,em); cer.SaveChanges(); 控制台。写(数据保存成功); } static void Main(string [] args) { test_App(); } } } 但它是例外: 无法找到EntitySet名称'certificationEntities.nitin'。

解决方案

sir !.... I'm new to the this topic! ihave written the code for edms but it is giving exception..... there are 2 files program.cs : using System; using System.Collections.Generic; using System.Linq; using System.Data.Entity; using System.Data; using System.Data.SqlClient; using System.Text; using BusinessObjects; namespace EntityFramework_demo { class Program { public static void test_App() { certificationEntities cer = new certificationEntities(); Emp em = new Emp(); em.ID = 3; em.Name = "niitin"; em.Age = 23; cer.AddObject("nitin",em); cer.SaveChanges(); Console.Write("data saved successfully"); } static void Main(string[] args) { test_App(); } } } But it is giving exception : The EntitySet name 'certificationEntities.nitin' could not be found.

解决方案

更多推荐

实体数据模型错误

本文发布于:2023-11-04 05:50:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557118.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实体   错误   数据模型

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!