开发者

insert,update, delete derived entity in entity framework 4.0

开发者 https://www.devze.com 2022-12-22 18:35 出处:网络
How do i insert an entity that is derived fr开发者_如何学Com another entity. here is my code but it\'s not working:(applicationreplacement derived from application

How do i insert an entity that is derived fr开发者_如何学Com another entity. here is my code but it's not working:(applicationreplacement derived from application

public void AddReplacementApp(Application entity,ApplicationReplacement rentity)
{            
     _ctx.CreateObjectSet<Application>().AddObject(rentity);
     _ctx.SaveChanges();    
}
0

精彩评论

暂无评论...
验证码 换一张
取 消