Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Billing/Interfaces/IObjectWithState.cs @ 14872

Last change on this file since 14872 was 9645, checked in by spimming, 12 years ago

#1888:

  • Model classes implement new interface to track current state of entity
  • Mark EntityState property as 'not mapped'
  • Set hook to initialize entity as unchanged
  • Extension method for DbContext to apply changes only on modified entity
File size: 433 bytes
Line 
1
2namespace HeuristicLab.Services.Optimization.Billing.Interfaces {
3  // Interface that determines the current state of the entity
4  // Model classes implement this interface
5  // Importatnt: client application is responsible for setting the correct state
6  public interface IObjectWithState {
7    State EntityState { get; set; }
8  }
9
10  public enum State {
11    Added,
12    Unchanged,
13    Modified,
14    Deleted
15  }
16}
Note: See TracBrowser for help on using the repository browser.