<br /><br />namespace myapp.bussines_layer<br />{<br />class Point<br />{<br /> int x;<br /> int y;<br /><br /> MyDatabase db = new MyDatabase();<br /><br /> //I want this...<br /> void InsertInDatabase()<br /> {<br /> db.NewRowInDB(this);<br /> }<br /><br /> //... instead of this<br /> void InsertInDatabase()<br /> {<br /> db.NewRowInDB(this.x, this.y);<br /> }<br />}<br />}<br />
Julen wrote:I use the tree tier model
var