Special ways to data slow load and bind tables
Code:
namespace Businesslogic.businessobject {[Serializable] [System.Data.Linq.Mapping.Table (Name = "Task")] public class BusiTask:KLimsCore.Model.Task {private busisamplecollection busisamples; public busisamplecollection busisamples {get {if (busisamples = = null) {busisamples = new busisamplecollection (); if (this.id!= 0) {busisamples.fillcollection ("Ta Skid= "+ this.id. ToString ()); } return busisamples; set {busisamples = value;}} public override string Gettablename () {return base. Gettablename (); } } }
Focus on:
get {if (busisamples = = null) {busisamples = new busisamplecollection (); if (this.id!= 0) {busisamples.fillcollection ( "Taskid=" + this.id. ToString ()); } return busisamples; }
Other than that
[System.Data.Linq.Mapping.Table (Name = "Task")]
Indicates which table is bound to the database.
http://anforen.5d6d.com/
http://four-corner.appspot.com/