insertonsubmit in entityframework

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
nicck
Posts: 1
Joined: Sat 04 May 2013 14:39

insertonsubmit in entityframework

Post by nicck » Sat 04 May 2013 14:47

I'm trying to convert this sample to entityframework.
I dont get the insertonsubmit and deleteonsubmit in entity.
http://scheduler-net.com/docs/simple_.n ... duler.html
please help with the controller part.

switch (action.Type)
{
case DataActionTypes.Insert: // your Insert logic
context.Events.InsertOnSubmit(updatedEvent);
break;
case DataActionTypes.Delete: // your Delete logic
updatedEvent = context.Events.SingleOrDefault(ev => ev.id == updatedEvent.id);
context.Events.DeleteOnSubmit(updatedEvent);
break;
default:// "update" // your Update logic
updatedEvent = context.Events.SingleOrDefault(
ev => ev.id == updatedEvent.id);
UpdateModel(updatedEvent);
break;
}

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: insertonsubmit in entityframework

Post by Shalex » Tue 14 May 2013 11:26

Please specify the template (and its non-default settings) you are using in your Entity Framework model.

Post Reply