File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Rdmp.Core/EntityFramework/Helpers Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313
1414namespace Rdmp . Core . EntityFramework . Helpers
1515{
16- public class DatabaseObject : IMapsDirectlyToDatabaseTable
16+ public class DatabaseObject : IMapsDirectlyToDatabaseTable , IDeleteable
1717 {
1818 public virtual int ID { get ; set ; }
1919
2020 public virtual RDMPDbContext CatalogueDbContext { get ; set ; }
2121
2222 public event PropertyChangedEventHandler PropertyChanged ;
2323
24+ public void DeleteInDatabase ( )
25+ {
26+ CatalogueDbContext . Remove ( this ) ;
27+ CatalogueDbContext . SaveChanges ( ) ;
28+ //throw new NotImplementedException();
29+ }
30+
2431 [ NotifyPropertyChangedInvocator ]
2532 protected virtual void OnPropertyChanged ( object oldValue , object newValue ,
2633[ CallerMemberName ] string propertyName = null )
You can’t perform that action at this time.
0 commit comments