コード例 #1
0
		public MasterServiceData SetMasterServiceData(MasterServiceData data)
		{
			if (GetMasterServiceData() != null)
				return null;

			using (ScutexServiceEntities db1 = new ScutexServiceEntities())
			{
				Master m = new Master();
				m.ServiceId = data.ServiceId;
				m.ClientInboundKey = data.ClientInboundKey;
				m.ClientOutboundKey = data.ClientOutboundKey;
				m.ManagementInboundKey = data.ManagementInboundKey;
				m.ManagementOutboundKey = data.ManagementOutboundKey;
				m.Token = data.Token;

				db1.AddToMasters(m);
				db1.SaveChanges();
			}

			return GetMasterServiceData();
		}
コード例 #2
0
ファイル: DB.Designer.cs プロジェクト: chantsunman/Scutex
 /// <summary>
 /// Deprecated Method for adding a new object to the Masters EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMasters(Master master)
 {
     base.AddObject("Masters", master);
 }
コード例 #3
0
ファイル: DB.Designer.cs プロジェクト: chantsunman/Scutex
 /// <summary>
 /// Create a new Master object.
 /// </summary>
 /// <param name="masterId">Initial value of the MasterId property.</param>
 /// <param name="serviceId">Initial value of the ServiceId property.</param>
 /// <param name="clientInboundKey">Initial value of the ClientInboundKey property.</param>
 /// <param name="clientOutboundKey">Initial value of the ClientOutboundKey property.</param>
 /// <param name="managementInboundKey">Initial value of the ManagementInboundKey property.</param>
 /// <param name="managementOutboundKey">Initial value of the ManagementOutboundKey property.</param>
 /// <param name="token">Initial value of the Token property.</param>
 /// <param name="initialized">Initial value of the Initialized property.</param>
 public static Master CreateMaster(global::System.Int32 masterId, global::System.Guid serviceId, global::System.String clientInboundKey, global::System.String clientOutboundKey, global::System.String managementInboundKey, global::System.String managementOutboundKey, global::System.String token, global::System.Boolean initialized)
 {
     Master master = new Master();
     master.MasterId = masterId;
     master.ServiceId = serviceId;
     master.ClientInboundKey = clientInboundKey;
     master.ClientOutboundKey = clientOutboundKey;
     master.ManagementInboundKey = managementInboundKey;
     master.ManagementOutboundKey = managementOutboundKey;
     master.Token = token;
     master.Initialized = initialized;
     return master;
 }