samedi 31 janvier 2015

What known interface should inherit that has abstract method for CRUD methods like SelectMethod?


Vote count:

0




I don't know if this concept exist in .NET so I'll describe what I want.


For ObjectDataSource currently we have to tell the Grid controls (.NET DataGrid or Telerik RadGrid) to use which method for SelectMethod, InsertMethod, UpdateMethod, DeleteMethod.


Let's face I have four methods M1, M2, M3, M4 that does all of above actions for ObjectDataSource CRUD operations.


The question is, is there a object or interface that grids know them ? that has abstract method for CRUD operations so I can inherit from it to implement CRUD operations ?


I'm doing this to stop grid controls ask me what method does the InsertMethod and other CRUD operations each time for each object.


Ex interface



interface AutoCRUD {
public abstract void SelectMethod();
public abstract void InsertMethod();
public abstract void UpdateMethod();
public abstract void JDeleteMethod();

}

class Player : AutoCRUD{
CRUD implementions ...
}


Now when I assign Player object to my ObjectDataSource then nothing should appear that ask me which method does UpdateMethod operations. In other words the grid should find out which methods to use by automatically.



asked 1 min ago

Mahdi

1,414






What known interface should inherit that has abstract method for CRUD methods like SelectMethod?

Aucun commentaire:

Enregistrer un commentaire