public void DeleteEvent(int id) { @event myEvent = [email protected](@event => @event.event_id == id); [email protected](myEvent); context.SubmitChanges(); }
public void AddRestockEvent(DateTime timestamp, int amount, int catalogId, int userId) { @event newevent = new @event { event_id = [email protected]() + 1, event_timestamp = timestamp, event_is_stocking = false, event_amount = amount, catalog_id = catalogId, user_id = userId }; [email protected](newevent); context.SubmitChanges(); }
public void AddEvent(int id, DateTime timestamp, bool isStocking, int amount, int catalogId, int userId) { @event newevent = new @event { event_id = id, event_timestamp = timestamp, event_is_stocking = isStocking, event_amount = amount, catalog_id = catalogId, user_id = userId }; [email protected](newevent); context.SubmitChanges(); }
private IEvent Map(@event e) { if (e == null) { return(null); } if (e.event_is_stocking) { return(new RestockEvent(e.event_id, e.event_timestamp, e.event_amount, e.catalog_id, e.user_id)); } else { return(new BuyEvent(e.event_id, e.event_timestamp, e.event_amount, e.catalog_id, e.user_id)); } }
private void detach_event(@event entity) { this.SendPropertyChanging(); entity.donut1 = null; }
private void attach_event(@event entity) { this.SendPropertyChanging(); entity.donut1 = this; }
partial void Deleteevent(@event instance);
partial void Updateevent(@event instance);
partial void Insertevent(@event instance);
private void attach_event(@event entity) { this.SendPropertyChanging(); entity.customer1 = this; }
private void attach_event(@event entity) { this.SendPropertyChanging(); entity.catalog = this; }
public IEvent GetEvent(int id) { @event e = [email protected](ev => ev.event_id == id); return(Map(e)); }