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