/// <summary> /// Equals function to compare class /// </summary> public virtual bool Exists(Int32 id) { try { DataAccess.DataSources dataSources = new DataAccess.DataSources(); return(dataSources.GetById(id) != null); } catch (Exception ex) { Trace.WriteError("{0}", "Exists", CLASSNAME, ex, id); throw; } }
/// <summary> /// Get a DataSource by id from the database /// </summary> public virtual Model.DataSource GetById(Int32 id) { try { DataAccess.DataSources dataSources = new DataAccess.DataSources(); Model.DataSource result = dataSources.GetById(id); return(result); } catch (Exception ex) { Trace.WriteError("{0}", "GetById", CLASSNAME, ex, id); throw; } }