Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [System.Data.Linq.Mapping.DatabaseAttribute(Name="MyDB")]
- public partial class MyDataContext : System.Data.Linq.DataContext
- {
- ...
- partial void OnCreated();
- partial void InsertMyTable(MyTable instance);
- partial void UpdateMyTable(MyTable instance);
- partial void DeleteMyTable(MyTable instance);
- ...
- public partial class MyDataContext
- {
- partial void OnCreated() {
- //do something on data context creation
- }
- }
- //this code will get optimised out if no body is implemented
- partial void DoSomethingIfCompFlag();
- #if COMPILER_FLAG
- //this code won't exist if the flag is off
- partial void DoSomethingIfCompFlag() {
- //your code
- }
- #endif
Add Comment
Please, Sign In to add comment