Example #1
0
        //**********************************************************
        //* Добавление данных о Vm, возвращает dataId
        //**********************************************************
        public static Int32 AddResearchVmData(String vmName, Int32 vmType, Int32 vmSystem, Int32 vmEnvType, String vmEnvMac, String vmEnvIp, String vmDescription = "")
        {
            using (SandBoxDataContext db = new SandBoxDataContext())
            {
                ResearchesVmData researchesVmData = new ResearchesVmData
                {
                    VmName = vmName,
                    VmType = vmType,
                    VmSystem = vmSystem,
                    VmEnvType = vmEnvType,
                    VmEnvMac = vmEnvMac,
                    VmEnvIp = vmEnvIp,
                    VmDescription = vmDescription
                };
                db.ResearchesVmDatas.InsertOnSubmit(researchesVmData);
                db.SubmitChanges();

                var rd = from r in db.ResearchesVmDatas
                                 where r.VmName == vmName
                                 select r.Id;

                return rd.Max();
            }
        }
Example #2
0
 partial void DeleteResearchesVmData(ResearchesVmData instance);
Example #3
0
 partial void InsertResearchesVmData(ResearchesVmData instance);
Example #4
0
 partial void UpdateResearchesVmData(ResearchesVmData instance);
Example #5
0
		private void detach_ResearchesVmDatas(ResearchesVmData entity)
		{
			this.SendPropertyChanging();
			entity.Research = null;
		}