public override void Dispose() { base.Dispose (); if (model != null) { model.Dispose (); model = null; } if (serviceModel != null) { serviceModel.Dispose (); serviceModel = null; } }
protected override void Dispose(bool disposing) { base.Dispose (disposing); if (model != null) { model.Dispose (); model = null; } if (serviceModel != null) { serviceModel.Dispose (); serviceModel = null; } }
public static ServiceModel GetCurrent() { ServiceModel m = new ServiceModel (); m.db = DataConnection.GetConnection (); return m; }