public void UpsertOwner(Owner theOwner)
 {
     using (RaveRadarContext _db = new RaveRadarContext())
     {
         UpsertOwner(theOwner, _db);
     }
 }
 public RaveDetails(Rave aRave, Owner aOwner, Venue aVenue)
 {
     RaveID = aRave.RaveID;
     Rave = aRave;
     Owner = aOwner;
     Venue = aVenue;
 }
 public void UpsertOwner(Owner theOwner, RaveRadarContext _db)
 {
     if (theOwner != null)
     {
         this.Database.ExecuteSqlCommand("exec UPSERT_Owner @OwnerID, @AccessToken, @Name, @IsCompany, @IsTrusted",
             new SqlParameter("@OwnerID", (object)theOwner.OwnerID),
             new SqlParameter("@AccessToken", (object)theOwner.AccessToken ?? DBNull.Value),
             new SqlParameter("@Name", (object)theOwner.Name),
             new SqlParameter("@IsCompany", (object)theOwner.IsCompany),
             new SqlParameter("@IsTrusted", (object)theOwner.IsTrusted));
     }
 }