Last change
on this file since 17663 was
9645,
checked in by spimming, 11 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 |
|
---|
2 | namespace 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.