/// <summary> /// 添加构架应用程序 /// </summary> /// <param name="ProjectCommon"></param> private void AddSchameLib(bool overWrite = true) { try { if (SolutionCommon.infrastryctType == InfrastructType.CodeFirst) { InfrastructureLogic.CreateCodeFirst(overWrite); DomainEntityLogic.CreateCodeFirst(overWrite); } else { InfrastructureLogic.Create(overWrite); DomainEntityLogic.Create(overWrite); } RepositoryLogic.Create(overWrite); Data2ObjLogic.Create(overWrite); ApplicationLogic.Create(overWrite); if (SolutionCommon.IsAddService) { ServiceLogic.CreateFrame(overWrite); ServiceLogic.CreateCode(overWrite); } else { ProjectContainer.Service = null; } //保存解决方案 if (_dte.Solution.Saved == false) { _dte.Solution.SaveAs(_dte.Solution.FullName); } } catch (Exception ex) { MsgBoxHelp.ShowError("Entity2Code Error:", ex); } }