//********************************************************** //* Добавление данных о 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(); } }
partial void DeleteResearchesVmData(ResearchesVmData instance);
partial void InsertResearchesVmData(ResearchesVmData instance);
partial void UpdateResearchesVmData(ResearchesVmData instance);
private void detach_ResearchesVmDatas(ResearchesVmData entity) { this.SendPropertyChanging(); entity.Research = null; }