Example #1
0
 public static Meter EditMeter(Int64 meterID)
 {
     Meter meter = new Meter();
     using (var context = new SycousCon())
     {
         try
         {
             meter = context.Meters.SingleOrDefault(s => s.ID == meterID);
         }
         catch (Exception ex)
         {
             context.Dispose();
             throw;
         }
     }
     return meter;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Meters EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMeters(Meter meter)
 {
     base.AddObject("Meters", meter);
 }
 /// <summary>
 /// Create a new Meter object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="billingOffset">Initial value of the BillingOffset property.</param>
 /// <param name="isDeleted">Initial value of the IsDeleted property.</param>
 /// <param name="isHighFrequency">Initial value of the IsHighFrequency property.</param>
 public static Meter CreateMeter(global::System.Int64 id, global::System.Boolean billingOffset, global::System.Int32 isDeleted, global::System.Int32 isHighFrequency)
 {
     Meter meter = new Meter();
     meter.ID = id;
     meter.BillingOffset = billingOffset;
     meter.IsDeleted = isDeleted;
     meter.IsHighFrequency = isHighFrequency;
     return meter;
 }