Acme.Northwind.Install.nHydrateSetting.GetVersionUpdateScript C# (CSharp) Метод

GetVersionUpdateScript() публичный Метод

public GetVersionUpdateScript ( ) : string
Результат string
		public string GetVersionUpdateScript()
		{
			var sb = new StringBuilder();
			sb.AppendLine("--ADD/UPDATE THE VERSION METADATA FOR THIS MODEL");
			sb.AppendLine("if exists(select * from [__nhydrateschema] where [ModelKey] = '" + this.ModelKey.ToString() + "')");
			sb.AppendLine("UPDATE [__nhydrateschema] SET [dbVersion]='" + this.dbVersion + "', [LastUpdate]='" + this.LastUpdate.ToString("yyyyMMdd HH:mm:ss") + "', [History]=[History]+'|" + this.ToHistoryString() + "' WHERE [ModelKey] = '" + this.ModelKey.ToString() + "'");
			sb.AppendLine("ELSE");
			sb.AppendLine("INSERT INTO [__nhydrateschema] ([dbVersion], [LastUpdate], [ModelKey], [History]) VALUES ('" + this.dbVersion + "', '" + this.LastUpdate.ToString("yyyyMMdd HH:mm:ss") + "', '" + this.ModelKey.ToString() + "', '" + this.ToHistoryString() + "')");
			sb.AppendLine();
			return sb.ToString();
		}