diff --git a/.gitignore b/.gitignore index 9bea4330f0..dee783d19c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,13 @@ .DS_Store +_ReSharper.Npgsql2010 +src/bin/ +src/obj/ +src/build/ +*.suo +*.csproj.user +*.DotSettings.user +testsuite/noninteractive/NUnit20/bin/ +testsuite/noninteractive/NUnit20/obj/ +NUnit20/obj/ +npgsql_tests.log diff --git a/lib/EntityFramework.dll b/lib/EntityFramework.dll new file mode 100644 index 0000000000..8caef36ac3 Binary files /dev/null and b/lib/EntityFramework.dll differ diff --git a/src/Npgsql/NpgsqlProviderManifest.cs b/src/Npgsql/NpgsqlProviderManifest.cs index e02b67e3d5..82d1896789 100644 --- a/src/Npgsql/NpgsqlProviderManifest.cs +++ b/src/Npgsql/NpgsqlProviderManifest.cs @@ -235,11 +235,11 @@ public override TypeUsage GetStoreType(TypeUsage edmType) if (edmType.Facets.TryGetValue(PrecisionFacet, false, out facet) && !facet.IsUnbounded && facet.Value != null) { - return TypeUsage.CreateDateTimeTypeUsage(StoreTypeNameToStorePrimitiveType["interval"], (byte)facet.Value); + return TypeUsage.CreateTimeTypeUsage(StoreTypeNameToStorePrimitiveType["interval"], (byte)facet.Value); } else { - return TypeUsage.CreateDateTimeTypeUsage(StoreTypeNameToStorePrimitiveType["interval"], null); + return TypeUsage.CreateTimeTypeUsage(StoreTypeNameToStorePrimitiveType["interval"], null); } case PrimitiveTypeKind.Binary: { diff --git a/src/Npgsql/SqlGenerators/SqlBaseGenerator.cs b/src/Npgsql/SqlGenerators/SqlBaseGenerator.cs index 27f4fb0c74..7dd63c25fc 100644 --- a/src/Npgsql/SqlGenerators/SqlBaseGenerator.cs +++ b/src/Npgsql/SqlGenerators/SqlBaseGenerator.cs @@ -1062,7 +1062,26 @@ private VisitedExpression VisitFunction(EdmFunction function, IList args) return extract_date; } + /// + /// PostgreSQL has no direct functions to implements DateTime canonical functions + /// http://msdn.microsoft.com/en-us/library/bb738626.aspx + /// http://msdn.microsoft.com/en-us/library/bb738626.aspx + /// but we can use workaround: + /// expression + number * INTERVAL '1 number_type' + /// where number_type is the number type (days, years and etc) + /// + /// + /// + /// + private VisitedExpression DateAdd(string functionName, IList args) + { + string operation = ""; + string part = ""; + bool nano = false; + if (functionName.Contains("Add")) + { + operation = "+"; + part = functionName.Substring(3); + } + else if (functionName.Contains("Diff")) + { + operation = "-"; + part = functionName.Substring(4); + } + else throw new NotSupportedException(); + + if (part == "Nanoseconds") + { + nano = true; + part = "Microseconds"; + } + + System.Diagnostics.Debug.Assert(args.Count == 2); + VisitedExpression dateAddDiff = new LiteralExpression(""); + dateAddDiff.Append(args[0].Accept(this)); + dateAddDiff.Append(operation); + dateAddDiff.Append(args[1].Accept(this)); + dateAddDiff.Append(nano + ? String.Format("/ 1000 * INTERVAL '1 {0}'", part) + : String.Format(" * INTERVAL '1 {0}'", part)); + + return dateAddDiff; + } + private VisitedExpression BitwiseOperator(IList args, string oper) { System.Diagnostics.Debug.Assert(args.Count == 2); diff --git a/src/Npgsql/SqlGenerators/VisitedExpression.cs b/src/Npgsql/SqlGenerators/VisitedExpression.cs index ee58bbeb04..efd800ae48 100644 --- a/src/Npgsql/SqlGenerators/VisitedExpression.cs +++ b/src/Npgsql/SqlGenerators/VisitedExpression.cs @@ -134,11 +134,12 @@ internal override void WriteSql(StringBuilder sqlText) case PrimitiveTypeKind.Boolean: case PrimitiveTypeKind.Guid: case PrimitiveTypeKind.String: - NpgsqlTypesHelper.TryGetNativeTypeInfo(GetDbType(_primitiveType), out typeInfo); + NpgsqlTypesHelper.TryGetNativeTypeInfo(GetDbType(_primitiveType), out typeInfo); + sqlText.Append('E'); sqlText.Append(typeInfo.ConvertToBackend(_value, false)); break; case PrimitiveTypeKind.Time: - sqlText.AppendFormat(ni, "TIME '{0:T}'", _value); + sqlText.AppendFormat(ni, "INTERVAL '{0:T}'", _value); break; case PrimitiveTypeKind.Byte: case PrimitiveTypeKind.SByte: diff --git a/src/NpgsqlTypes/NpgsqlTypesHelper.cs b/src/NpgsqlTypes/NpgsqlTypesHelper.cs index 262efde412..64872f1e3c 100644 --- a/src/NpgsqlTypes/NpgsqlTypesHelper.cs +++ b/src/NpgsqlTypes/NpgsqlTypesHelper.cs @@ -1112,13 +1112,14 @@ private String ConvertToBackendPlainQuery(Object NativeData) Convert.ChangeType(Enum.Format(NativeData.GetType(), NativeData, "d"), typeof (String), CultureInfo.InvariantCulture)); } - else if (NativeData is IFormattable) - { - return - (this.Quote - ? QuoteString(((IFormattable) NativeData).ToString(null, ni).Replace("'", "''").Replace("\\", "\\\\")) - : ((IFormattable) NativeData).ToString(null, ni).Replace("'", "''").Replace("\\", "\\\\")); - } + IFormattable nativeData = NativeData as IFormattable; + if (nativeData != null) + { + return + (this.Quote + ? QuoteString((nativeData).ToString(null, ni).Replace("'", "''").Replace("\\", "\\\\")) + : (nativeData).ToString(null, ni).Replace("'", "''").Replace("\\", "\\\\")); + } // Do special handling of strings when in simple query. Escape quotes and backslashes. return diff --git a/testsuite/noninteractive/NUnit20/App.config b/testsuite/noninteractive/NUnit20/App.config index d99f232d43..bb72464d94 100644 --- a/testsuite/noninteractive/NUnit20/App.config +++ b/testsuite/noninteractive/NUnit20/App.config @@ -5,6 +5,16 @@ - + + - + + + + + + + + + + diff --git a/testsuite/noninteractive/NUnit20/BackslashTests.cs b/testsuite/noninteractive/NUnit20/BackslashTests.cs new file mode 100644 index 0000000000..e3091ab2d7 --- /dev/null +++ b/testsuite/noninteractive/NUnit20/BackslashTests.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Data.EntityClient; +using System.Data.Objects; +using System.Data.SqlClient; +using System.Linq; +using System.Text; + +using System; +using System.Data; +using System.Configuration; +using Npgsql; + +using NpgsqlTypes; + +using NUnit.Framework; + + + +namespace NpgsqlTests +{ + [TestFixture] + public class BackslashTests: BaseClassTests + { + + protected override NpgsqlConnection TheConnection + { + get { return _conn; } + } + protected override NpgsqlTransaction TheTransaction + { + get { return _t; } + set { _t = value; } + } + protected virtual string TheConnectionString + { + get { return _connString; } + } + + [Test] + public void TestStoreUsingSQL() + { + CommitTransaction = true; + const string testString = "av\\fs\\dgdg\t\n\b\f\n\t"; + + NpgsqlCommand command = new NpgsqlCommand(); + command.Connection = TheConnection; + command.CommandText = "INSERT INTO tablea(\"field_text\") VALUES(@field_text)"; + command.Parameters.AddWithValue("field_text", testString); + command.ExecuteNonQuery(); + + command.CommandText = "SELECT field_text FROM tablea WHERE oid =" + command.LastInsertedOID; + var result = command.ExecuteScalar(); + + if (result != null) + Assert.AreEqual(testString, result.ToString()); + else + { + Assert.Fail(); + } + } + + [Test] + public void TestSingleUsingSQL() + { + CommitTransaction = true; + const string testString = @"\"; + + NpgsqlCommand command = new NpgsqlCommand(); + command.Connection = TheConnection; + command.CommandText = "INSERT INTO tablea(\"field_text\") VALUES(@field_text)"; + command.Parameters.AddWithValue("field_text", testString); + command.ExecuteNonQuery(); + + command.CommandText = "SELECT field_text FROM tablea WHERE oid =" + command.LastInsertedOID; + var result = command.ExecuteScalar(); + + if (result != null) + Assert.AreEqual(testString, result.ToString()); + else + { + Assert.Fail(); + } + } + + [Test] + public void TestStoreUsignEF() + { + string testString = "av\\fs\\dgdg\t\n\b\f\n\t"; + + var context = new TestContext(); + var obj = new Tablea() + { + Field_text = testString, + }; + context.Tablea.Add(obj); + context.SaveChanges(); + context.Dispose(); + + context = new TestContext(); + var result = context.Tablea.FirstOrDefault(x => x.Field_serial == obj.Field_serial); + if (result != null) + { + Assert.AreEqual(result.Field_text, testString); + } + else + { + Assert.Fail(); + } + } + + [Test] + public void TestSingleUsignEF() + { + const string testString = @"\"; + + var context = new TestContext(); + var obj = new Tablea() + { + Field_text = testString, + }; + context.Tablea.Add(obj); + context.SaveChanges(); + context.Dispose(); + + context = new TestContext(); + var result = context.Tablea.FirstOrDefault(x => x.Field_serial == obj.Field_serial); + if (result != null) + { + Assert.AreEqual(result.Field_text, testString); + } + else + { + Assert.Fail(); + } + } + + } +} diff --git a/testsuite/noninteractive/NUnit20/BaseClassTests.cs b/testsuite/noninteractive/NUnit20/BaseClassTests.cs index 4e21e80547..bf9a35609a 100644 --- a/testsuite/noninteractive/NUnit20/BaseClassTests.cs +++ b/testsuite/noninteractive/NUnit20/BaseClassTests.cs @@ -117,12 +117,7 @@ protected virtual void TearDown() if (_connV2.State != ConnectionState.Closed) _connV2.Close(); - } - - - - - + } } } diff --git a/testsuite/noninteractive/NUnit20/NpgsqlTests2010.csproj b/testsuite/noninteractive/NUnit20/NpgsqlTests2010.csproj index b6ea4c7437..1352ec757e 100644 --- a/testsuite/noninteractive/NUnit20/NpgsqlTests2010.csproj +++ b/testsuite/noninteractive/NUnit20/NpgsqlTests2010.csproj @@ -58,7 +58,12 @@ 4 + + False + ..\..\..\lib\EntityFramework.dll + + 3.5 @@ -77,9 +82,11 @@ + + @@ -87,23 +94,13 @@ + - - Designer - - Always - - - Always - - - Always - @@ -139,4 +136,4 @@ - + \ No newline at end of file diff --git a/testsuite/noninteractive/NUnit20/POCO/Context.cs b/testsuite/noninteractive/NUnit20/POCO/Context.cs new file mode 100644 index 0000000000..fd7751e7ce --- /dev/null +++ b/testsuite/noninteractive/NUnit20/POCO/Context.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity; + +namespace NpgsqlTests +{ + public class TestContext : DbContext + { + public DbSet Tablea { get; set; } + } +} diff --git a/testsuite/noninteractive/NUnit20/POCO/Tablea.cs b/testsuite/noninteractive/NUnit20/POCO/Tablea.cs new file mode 100644 index 0000000000..eb8f6a492c --- /dev/null +++ b/testsuite/noninteractive/NUnit20/POCO/Tablea.cs @@ -0,0 +1,27 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace NpgsqlTests +{ + [Table("tablea", Schema = "public")] + public class Tablea + { + [Column("field_serial"), Key] + public long Field_serial { get; set; } + + [Column("field_text")] + public string Field_text { get; set; } + + [Column("field_int4")] + public int? Field_int4 { get; set; } + + [Column("field_int8")] + public int? Field_int8 { get; set; } + + [Column("field_bool")] + public bool? Field_bool { get; set; } + + } +} diff --git a/testsuite/noninteractive/NUnit20/TypesTests.cs b/testsuite/noninteractive/NUnit20/TypesTests.cs index bd4992f8fb..1bda6d3794 100644 --- a/testsuite/noninteractive/NUnit20/TypesTests.cs +++ b/testsuite/noninteractive/NUnit20/TypesTests.cs @@ -632,11 +632,7 @@ public void Bug1011018() Object o = p.Value; - - } - - - + } } diff --git a/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ObjectLayer.cs b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ObjectLayer.cs new file mode 100644 index 0000000000..bc13c075c2 --- /dev/null +++ b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ObjectLayer.cs @@ -0,0 +1,1938 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()] +[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.Customer), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.SalesOrderHeader))] +[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "UserDetails_FK", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.User), "UserDetails", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(XmlTest.UserDetails))] +[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "UserToken_FK", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.User), "UserToken", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(XmlTest.UserToken))] +[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "dispTargetViews", "dispViews", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.dispViews), "dispViews1", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.dispViews))] + +// Original file name: XmlTest.ObjectLayer.cs +// Generation date: 12/21/2009 7:46:26 PM +namespace XmlTest +{ + + /// + /// There are no comments for XmlTestContext in the schema. + /// + public partial class XmlTestContext : global::System.Data.Objects.ObjectContext + { + /// + /// Initializes a new XmlTestContext object using the connection string found in the 'XmlTestContext' section of the application configuration file. + /// + public XmlTestContext() : + base("name=XmlTestContext", "XmlTestContext") + { + this.OnContextCreated(); + } + /// + /// Initialize a new XmlTestContext object. + /// + public XmlTestContext(string connectionString) : + base(connectionString, "XmlTestContext") + { + this.OnContextCreated(); + } + /// + /// Initialize a new XmlTestContext object. + /// + public XmlTestContext(global::System.Data.EntityClient.EntityConnection connection) : + base(connection, "XmlTestContext") + { + this.OnContextCreated(); + } + partial void OnContextCreated(); + /// + /// There are no comments for Customer in the schema. + /// + public global::System.Data.Objects.ObjectQuery Customer + { + get + { + if ((this._Customer == null)) + { + this._Customer = base.CreateQuery("[Customer]"); + } + return this._Customer; + } + } + private global::System.Data.Objects.ObjectQuery _Customer; + /// + /// There are no comments for SalesOrderHeader in the schema. + /// + public global::System.Data.Objects.ObjectQuery SalesOrderHeader + { + get + { + if ((this._SalesOrderHeader == null)) + { + this._SalesOrderHeader = base.CreateQuery("[SalesOrderHeader]"); + } + return this._SalesOrderHeader; + } + } + private global::System.Data.Objects.ObjectQuery _SalesOrderHeader; + /// + /// There are no comments for User in the schema. + /// + public global::System.Data.Objects.ObjectQuery User + { + get + { + if ((this._User == null)) + { + this._User = base.CreateQuery("[User]"); + } + return this._User; + } + } + private global::System.Data.Objects.ObjectQuery _User; + /// + /// There are no comments for UserDetails in the schema. + /// + public global::System.Data.Objects.ObjectQuery UserDetails + { + get + { + if ((this._UserDetails == null)) + { + this._UserDetails = base.CreateQuery("[UserDetails]"); + } + return this._UserDetails; + } + } + private global::System.Data.Objects.ObjectQuery _UserDetails; + /// + /// There are no comments for UserToken in the schema. + /// + public global::System.Data.Objects.ObjectQuery UserToken + { + get + { + if ((this._UserToken == null)) + { + this._UserToken = base.CreateQuery("[UserToken]"); + } + return this._UserToken; + } + } + private global::System.Data.Objects.ObjectQuery _UserToken; + /// + /// There are no comments for XmlTable in the schema. + /// + public global::System.Data.Objects.ObjectQuery XmlTable + { + get + { + if ((this._XmlTable == null)) + { + this._XmlTable = base.CreateQuery("[XmlTable]"); + } + return this._XmlTable; + } + } + private global::System.Data.Objects.ObjectQuery _XmlTable; + /// + /// There are no comments for dispViews in the schema. + /// + public global::System.Data.Objects.ObjectQuery dispViews + { + get + { + if ((this._dispViews == null)) + { + this._dispViews = base.CreateQuery("[dispViews]"); + } + return this._dispViews; + } + } + private global::System.Data.Objects.ObjectQuery _dispViews; + /// + /// There are no comments for Customer in the schema. + /// + public void AddToCustomer(Customer customer) + { + base.AddObject("Customer", customer); + } + /// + /// There are no comments for SalesOrderHeader in the schema. + /// + public void AddToSalesOrderHeader(SalesOrderHeader salesOrderHeader) + { + base.AddObject("SalesOrderHeader", salesOrderHeader); + } + /// + /// There are no comments for User in the schema. + /// + public void AddToUser(User user) + { + base.AddObject("User", user); + } + /// + /// There are no comments for UserDetails in the schema. + /// + public void AddToUserDetails(UserDetails userDetails) + { + base.AddObject("UserDetails", userDetails); + } + /// + /// There are no comments for UserToken in the schema. + /// + public void AddToUserToken(UserToken userToken) + { + base.AddObject("UserToken", userToken); + } + /// + /// There are no comments for XmlTable in the schema. + /// + public void AddToXmlTable(XmlTable xmlTable) + { + base.AddObject("XmlTable", xmlTable); + } + /// + /// There are no comments for dispViews in the schema. + /// + public void AddTodispViews(dispViews dispViews) + { + base.AddObject("dispViews", dispViews); + } + } + /// + /// There are no comments for XmlTest.Customer in the schema. + /// + /// + /// OrderID + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="Customer")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class Customer : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new Customer object. + /// + /// Initial value of OrderID. + /// Initial value of NameStyle. + /// Initial value of Active. + /// Initial value of ModifiedDate. + /// Initial value of Created. + /// Initial value of NewCustomer. + /// Initial value of Potential. + /// Initial value of NewAssigned. + /// Initial value of OldActive. + /// Initial value of Total. + public static Customer CreateCustomer(int orderID, int nameStyle, bool active, global::System.DateTime modifiedDate, global::System.DateTime created, bool newCustomer, bool potential, bool newAssigned, bool oldActive, decimal total) + { + Customer customer = new Customer(); + customer.OrderID = orderID; + customer.NameStyle = nameStyle; + customer.Active = active; + customer.ModifiedDate = modifiedDate; + customer.Created = created; + customer.NewCustomer = newCustomer; + customer.Potential = potential; + customer.NewAssigned = newAssigned; + customer.OldActive = oldActive; + customer.Total = total; + return customer; + } + /// + /// There are no comments for Property OrderID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int OrderID + { + get + { + return this._OrderID; + } + set + { + this.OnOrderIDChanging(value); + this.ReportPropertyChanging("OrderID"); + this._OrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("OrderID"); + this.OnOrderIDChanged(); + } + } + private int _OrderID; + partial void OnOrderIDChanging(int value); + partial void OnOrderIDChanged(); + /// + /// There are no comments for Property NameStyle in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int NameStyle + { + get + { + return this._NameStyle; + } + set + { + this.OnNameStyleChanging(value); + this.ReportPropertyChanging("NameStyle"); + this._NameStyle = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("NameStyle"); + this.OnNameStyleChanged(); + } + } + private int _NameStyle; + partial void OnNameStyleChanging(int value); + partial void OnNameStyleChanged(); + /// + /// There are no comments for Property FirstName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string FirstName + { + get + { + return this._FirstName; + } + set + { + this.OnFirstNameChanging(value); + this.ReportPropertyChanging("FirstName"); + this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("FirstName"); + this.OnFirstNameChanged(); + } + } + private string _FirstName; + partial void OnFirstNameChanging(string value); + partial void OnFirstNameChanged(); + /// + /// There are no comments for Property LastName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string LastName + { + get + { + return this._LastName; + } + set + { + this.OnLastNameChanging(value); + this.ReportPropertyChanging("LastName"); + this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("LastName"); + this.OnLastNameChanged(); + } + } + private string _LastName; + partial void OnLastNameChanging(string value); + partial void OnLastNameChanged(); + /// + /// There are no comments for Property Active in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool Active + { + get + { + return this._Active; + } + set + { + this.OnActiveChanging(value); + this.ReportPropertyChanging("Active"); + this._Active = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Active"); + this.OnActiveChanged(); + } + } + private bool _Active; + partial void OnActiveChanging(bool value); + partial void OnActiveChanged(); + /// + /// There are no comments for Property ModifiedDate in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.DateTime ModifiedDate + { + get + { + return this._ModifiedDate; + } + set + { + this.OnModifiedDateChanging(value); + this.ReportPropertyChanging("ModifiedDate"); + this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("ModifiedDate"); + this.OnModifiedDateChanged(); + } + } + private global::System.DateTime _ModifiedDate; + partial void OnModifiedDateChanging(global::System.DateTime value); + partial void OnModifiedDateChanged(); + /// + /// There are no comments for Property TourNumber in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable TourNumber + { + get + { + return this._TourNumber; + } + set + { + this.OnTourNumberChanging(value); + this.ReportPropertyChanging("TourNumber"); + this._TourNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("TourNumber"); + this.OnTourNumberChanged(); + } + } + private global::System.Nullable _TourNumber; + partial void OnTourNumberChanging(global::System.Nullable value); + partial void OnTourNumberChanged(); + /// + /// There are no comments for Property ExternalNumber in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable ExternalNumber + { + get + { + return this._ExternalNumber; + } + set + { + this.OnExternalNumberChanging(value); + this.ReportPropertyChanging("ExternalNumber"); + this._ExternalNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("ExternalNumber"); + this.OnExternalNumberChanged(); + } + } + private global::System.Nullable _ExternalNumber; + partial void OnExternalNumberChanging(global::System.Nullable value); + partial void OnExternalNumberChanged(); + /// + /// There are no comments for Property MainPhone1 in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string MainPhone1 + { + get + { + return this._MainPhone1; + } + set + { + this.OnMainPhone1Changing(value); + this.ReportPropertyChanging("MainPhone1"); + this._MainPhone1 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("MainPhone1"); + this.OnMainPhone1Changed(); + } + } + private string _MainPhone1; + partial void OnMainPhone1Changing(string value); + partial void OnMainPhone1Changed(); + /// + /// There are no comments for Property MainPhone2 in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string MainPhone2 + { + get + { + return this._MainPhone2; + } + set + { + this.OnMainPhone2Changing(value); + this.ReportPropertyChanging("MainPhone2"); + this._MainPhone2 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("MainPhone2"); + this.OnMainPhone2Changed(); + } + } + private string _MainPhone2; + partial void OnMainPhone2Changing(string value); + partial void OnMainPhone2Changed(); + /// + /// There are no comments for Property PreOrderID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string PreOrderID + { + get + { + return this._PreOrderID; + } + set + { + this.OnPreOrderIDChanging(value); + this.ReportPropertyChanging("PreOrderID"); + this._PreOrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("PreOrderID"); + this.OnPreOrderIDChanged(); + } + } + private string _PreOrderID; + partial void OnPreOrderIDChanging(string value); + partial void OnPreOrderIDChanged(); + /// + /// There are no comments for Property LastVisit in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable LastVisit + { + get + { + return this._LastVisit; + } + set + { + this.OnLastVisitChanging(value); + this.ReportPropertyChanging("LastVisit"); + this._LastVisit = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("LastVisit"); + this.OnLastVisitChanged(); + } + } + private global::System.Nullable _LastVisit; + partial void OnLastVisitChanging(global::System.Nullable value); + partial void OnLastVisitChanged(); + /// + /// There are no comments for Property Created in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.DateTime Created + { + get + { + return this._Created; + } + set + { + this.OnCreatedChanging(value); + this.ReportPropertyChanging("Created"); + this._Created = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Created"); + this.OnCreatedChanged(); + } + } + private global::System.DateTime _Created; + partial void OnCreatedChanging(global::System.DateTime value); + partial void OnCreatedChanged(); + /// + /// There are no comments for Property ExternalName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string ExternalName + { + get + { + return this._ExternalName; + } + set + { + this.OnExternalNameChanging(value); + this.ReportPropertyChanging("ExternalName"); + this._ExternalName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("ExternalName"); + this.OnExternalNameChanged(); + } + } + private string _ExternalName; + partial void OnExternalNameChanging(string value); + partial void OnExternalNameChanged(); + /// + /// There are no comments for Property NewCustomer in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool NewCustomer + { + get + { + return this._NewCustomer; + } + set + { + this.OnNewCustomerChanging(value); + this.ReportPropertyChanging("NewCustomer"); + this._NewCustomer = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("NewCustomer"); + this.OnNewCustomerChanged(); + } + } + private bool _NewCustomer; + partial void OnNewCustomerChanging(bool value); + partial void OnNewCustomerChanged(); + /// + /// There are no comments for Property Potential in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool Potential + { + get + { + return this._Potential; + } + set + { + this.OnPotentialChanging(value); + this.ReportPropertyChanging("Potential"); + this._Potential = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Potential"); + this.OnPotentialChanged(); + } + } + private bool _Potential; + partial void OnPotentialChanging(bool value); + partial void OnPotentialChanged(); + /// + /// There are no comments for Property CustomerID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable CustomerID + { + get + { + return this._CustomerID; + } + set + { + this.OnCustomerIDChanging(value); + this.ReportPropertyChanging("CustomerID"); + this._CustomerID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("CustomerID"); + this.OnCustomerIDChanged(); + } + } + private global::System.Nullable _CustomerID; + partial void OnCustomerIDChanging(global::System.Nullable value); + partial void OnCustomerIDChanged(); + /// + /// There are no comments for Property OldExternalNumber in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable OldExternalNumber + { + get + { + return this._OldExternalNumber; + } + set + { + this.OnOldExternalNumberChanging(value); + this.ReportPropertyChanging("OldExternalNumber"); + this._OldExternalNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("OldExternalNumber"); + this.OnOldExternalNumberChanged(); + } + } + private global::System.Nullable _OldExternalNumber; + partial void OnOldExternalNumberChanging(global::System.Nullable value); + partial void OnOldExternalNumberChanged(); + /// + /// There are no comments for Property OldTourNumber in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable OldTourNumber + { + get + { + return this._OldTourNumber; + } + set + { + this.OnOldTourNumberChanging(value); + this.ReportPropertyChanging("OldTourNumber"); + this._OldTourNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("OldTourNumber"); + this.OnOldTourNumberChanged(); + } + } + private global::System.Nullable _OldTourNumber; + partial void OnOldTourNumberChanging(global::System.Nullable value); + partial void OnOldTourNumberChanged(); + /// + /// There are no comments for Property NewAssigned in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool NewAssigned + { + get + { + return this._NewAssigned; + } + set + { + this.OnNewAssignedChanging(value); + this.ReportPropertyChanging("NewAssigned"); + this._NewAssigned = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("NewAssigned"); + this.OnNewAssignedChanged(); + } + } + private bool _NewAssigned; + partial void OnNewAssignedChanging(bool value); + partial void OnNewAssignedChanged(); + /// + /// There are no comments for Property OldActive in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool OldActive + { + get + { + return this._OldActive; + } + set + { + this.OnOldActiveChanging(value); + this.ReportPropertyChanging("OldActive"); + this._OldActive = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("OldActive"); + this.OnOldActiveChanged(); + } + } + private bool _OldActive; + partial void OnOldActiveChanging(bool value); + partial void OnOldActiveChanged(); + /// + /// There are no comments for Property StartDate in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + this.OnStartDateChanging(value); + this.ReportPropertyChanging("StartDate"); + this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + private global::System.Nullable _StartDate; + partial void OnStartDateChanging(global::System.Nullable value); + partial void OnStartDateChanged(); + /// + /// There are no comments for Property Total in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal Total + { + get + { + return this._Total; + } + set + { + this.OnTotalChanging(value); + this.ReportPropertyChanging("Total"); + this._Total = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Total"); + this.OnTotalChanged(); + } + } + private decimal _Total; + partial void OnTotalChanging(decimal value); + partial void OnTotalChanged(); + /// + /// There are no comments for SalesOrderHeader in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "SalesOrderHeader")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityCollection SalesOrderHeader + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("XmlTest.SalesOrderHeader_OrderID_fkey", "SalesOrderHeader"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("XmlTest.SalesOrderHeader_OrderID_fkey", "SalesOrderHeader", value); + } + } + } + } + /// + /// There are no comments for XmlTest.SalesOrderHeader in the schema. + /// + /// + /// ID + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="SalesOrderHeader")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class SalesOrderHeader : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new SalesOrderHeader object. + /// + /// Initial value of Status. + /// Initial value of SubTotal. + /// Initial value of TotalDue. + /// Initial value of BookCounter. + /// Initial value of SubSubTotal. + /// Initial value of PriceRabatt15. + /// Initial value of Total. + /// Initial value of Discount. + /// Initial value of Rabatt. + /// Initial value of ID. + /// Initial value of Saison. + public static SalesOrderHeader CreateSalesOrderHeader(int status, decimal subTotal, decimal totalDue, int bookCounter, decimal subSubTotal, bool priceRabatt15, decimal total, decimal discount, decimal rabatt, int id, string saison) + { + SalesOrderHeader salesOrderHeader = new SalesOrderHeader(); + salesOrderHeader.Status = status; + salesOrderHeader.SubTotal = subTotal; + salesOrderHeader.TotalDue = totalDue; + salesOrderHeader.BookCounter = bookCounter; + salesOrderHeader.SubSubTotal = subSubTotal; + salesOrderHeader.PriceRabatt15 = priceRabatt15; + salesOrderHeader.Total = total; + salesOrderHeader.Discount = discount; + salesOrderHeader.Rabatt = rabatt; + salesOrderHeader.ID = id; + salesOrderHeader.Saison = saison; + return salesOrderHeader; + } + /// + /// There are no comments for Property OrderDate in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable OrderDate + { + get + { + return this._OrderDate; + } + set + { + this.OnOrderDateChanging(value); + this.ReportPropertyChanging("OrderDate"); + this._OrderDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("OrderDate"); + this.OnOrderDateChanged(); + } + } + private global::System.Nullable _OrderDate; + partial void OnOrderDateChanging(global::System.Nullable value); + partial void OnOrderDateChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this.ReportPropertyChanging("Status"); + this._Status = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + private int _Status; + partial void OnStatusChanging(int value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property BillToAddressID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable BillToAddressID + { + get + { + return this._BillToAddressID; + } + set + { + this.OnBillToAddressIDChanging(value); + this.ReportPropertyChanging("BillToAddressID"); + this._BillToAddressID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("BillToAddressID"); + this.OnBillToAddressIDChanged(); + } + } + private global::System.Nullable _BillToAddressID; + partial void OnBillToAddressIDChanging(global::System.Nullable value); + partial void OnBillToAddressIDChanged(); + /// + /// There are no comments for Property SubTotal in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal SubTotal + { + get + { + return this._SubTotal; + } + set + { + this.OnSubTotalChanging(value); + this.ReportPropertyChanging("SubTotal"); + this._SubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("SubTotal"); + this.OnSubTotalChanged(); + } + } + private decimal _SubTotal; + partial void OnSubTotalChanging(decimal value); + partial void OnSubTotalChanged(); + /// + /// There are no comments for Property TotalDue in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal TotalDue + { + get + { + return this._TotalDue; + } + set + { + this.OnTotalDueChanging(value); + this.ReportPropertyChanging("TotalDue"); + this._TotalDue = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("TotalDue"); + this.OnTotalDueChanged(); + } + } + private decimal _TotalDue; + partial void OnTotalDueChanging(decimal value); + partial void OnTotalDueChanged(); + /// + /// There are no comments for Property Comment in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Comment + { + get + { + return this._Comment; + } + set + { + this.OnCommentChanging(value); + this.ReportPropertyChanging("Comment"); + this._Comment = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("Comment"); + this.OnCommentChanged(); + } + } + private string _Comment; + partial void OnCommentChanging(string value); + partial void OnCommentChanged(); + /// + /// There are no comments for Property ModifiedDate in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable ModifiedDate + { + get + { + return this._ModifiedDate; + } + set + { + this.OnModifiedDateChanging(value); + this.ReportPropertyChanging("ModifiedDate"); + this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("ModifiedDate"); + this.OnModifiedDateChanged(); + } + } + private global::System.Nullable _ModifiedDate; + partial void OnModifiedDateChanging(global::System.Nullable value); + partial void OnModifiedDateChanged(); + /// + /// There are no comments for Property PaymentVersion in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable PaymentVersion + { + get + { + return this._PaymentVersion; + } + set + { + this.OnPaymentVersionChanging(value); + this.ReportPropertyChanging("PaymentVersion"); + this._PaymentVersion = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("PaymentVersion"); + this.OnPaymentVersionChanged(); + } + } + private global::System.Nullable _PaymentVersion; + partial void OnPaymentVersionChanging(global::System.Nullable value); + partial void OnPaymentVersionChanged(); + /// + /// There are no comments for Property BillID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string BillID + { + get + { + return this._BillID; + } + set + { + this.OnBillIDChanging(value); + this.ReportPropertyChanging("BillID"); + this._BillID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("BillID"); + this.OnBillIDChanged(); + } + } + private string _BillID; + partial void OnBillIDChanging(string value); + partial void OnBillIDChanged(); + /// + /// There are no comments for Property BookCounter in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int BookCounter + { + get + { + return this._BookCounter; + } + set + { + this.OnBookCounterChanging(value); + this.ReportPropertyChanging("BookCounter"); + this._BookCounter = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("BookCounter"); + this.OnBookCounterChanged(); + } + } + private int _BookCounter; + partial void OnBookCounterChanging(int value); + partial void OnBookCounterChanged(); + /// + /// There are no comments for Property SendID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable SendID + { + get + { + return this._SendID; + } + set + { + this.OnSendIDChanging(value); + this.ReportPropertyChanging("SendID"); + this._SendID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("SendID"); + this.OnSendIDChanged(); + } + } + private global::System.Nullable _SendID; + partial void OnSendIDChanging(global::System.Nullable value); + partial void OnSendIDChanged(); + /// + /// There are no comments for Property SubSubTotal in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal SubSubTotal + { + get + { + return this._SubSubTotal; + } + set + { + this.OnSubSubTotalChanging(value); + this.ReportPropertyChanging("SubSubTotal"); + this._SubSubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("SubSubTotal"); + this.OnSubSubTotalChanged(); + } + } + private decimal _SubSubTotal; + partial void OnSubSubTotalChanging(decimal value); + partial void OnSubSubTotalChanged(); + /// + /// There are no comments for Property PriceRabatt15 in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public bool PriceRabatt15 + { + get + { + return this._PriceRabatt15; + } + set + { + this.OnPriceRabatt15Changing(value); + this.ReportPropertyChanging("PriceRabatt15"); + this._PriceRabatt15 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("PriceRabatt15"); + this.OnPriceRabatt15Changed(); + } + } + private bool _PriceRabatt15; + partial void OnPriceRabatt15Changing(bool value); + partial void OnPriceRabatt15Changed(); + /// + /// There are no comments for Property Total in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal Total + { + get + { + return this._Total; + } + set + { + this.OnTotalChanging(value); + this.ReportPropertyChanging("Total"); + this._Total = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Total"); + this.OnTotalChanged(); + } + } + private decimal _Total; + partial void OnTotalChanging(decimal value); + partial void OnTotalChanged(); + /// + /// There are no comments for Property Discount in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal Discount + { + get + { + return this._Discount; + } + set + { + this.OnDiscountChanging(value); + this.ReportPropertyChanging("Discount"); + this._Discount = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Discount"); + this.OnDiscountChanged(); + } + } + private decimal _Discount; + partial void OnDiscountChanging(decimal value); + partial void OnDiscountChanged(); + /// + /// There are no comments for Property Rabatt in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public decimal Rabatt + { + get + { + return this._Rabatt; + } + set + { + this.OnRabattChanging(value); + this.ReportPropertyChanging("Rabatt"); + this._Rabatt = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("Rabatt"); + this.OnRabattChanged(); + } + } + private decimal _Rabatt; + partial void OnRabattChanging(decimal value); + partial void OnRabattChanged(); + /// + /// There are no comments for Property SendDate in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable SendDate + { + get + { + return this._SendDate; + } + set + { + this.OnSendDateChanging(value); + this.ReportPropertyChanging("SendDate"); + this._SendDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("SendDate"); + this.OnSendDateChanged(); + } + } + private global::System.Nullable _SendDate; + partial void OnSendDateChanging(global::System.Nullable value); + partial void OnSendDateChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this.ReportPropertyChanging("ID"); + this._ID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("ID"); + this.OnIDChanged(); + } + } + private int _ID; + partial void OnIDChanging(int value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Saison in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Saison + { + get + { + return this._Saison; + } + set + { + this.OnSaisonChanging(value); + this.ReportPropertyChanging("Saison"); + this._Saison = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); + this.ReportPropertyChanged("Saison"); + this.OnSaisonChanged(); + } + } + private string _Saison; + partial void OnSaisonChanging(string value); + partial void OnSaisonChanged(); + /// + /// There are no comments for Customer in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "Customer")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public Customer Customer + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer").Value; + } + set + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer").Value = value; + } + } + /// + /// There are no comments for Customer in the schema. + /// + [global::System.ComponentModel.BrowsableAttribute(false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityReference CustomerReference + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer", value); + } + } + } + } + /// + /// There are no comments for XmlTest.User in the schema. + /// + /// + /// UserId + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="User")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class User : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new User object. + /// + /// Initial value of UserId. + public static User CreateUser(int userId) + { + User user = new User(); + user.UserId = userId; + return user; + } + /// + /// There are no comments for Property UserId in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int UserId + { + get + { + return this._UserId; + } + set + { + this.OnUserIdChanging(value); + this.ReportPropertyChanging("UserId"); + this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + private int _UserId; + partial void OnUserIdChanging(int value); + partial void OnUserIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this.ReportPropertyChanging("Name"); + this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("Name"); + this.OnNameChanged(); + } + } + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Login in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Login + { + get + { + return this._Login; + } + set + { + this.OnLoginChanging(value); + this.ReportPropertyChanging("Login"); + this._Login = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("Login"); + this.OnLoginChanged(); + } + } + private string _Login; + partial void OnLoginChanging(string value); + partial void OnLoginChanged(); + /// + /// There are no comments for Property StatusId in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Nullable StatusId + { + get + { + return this._StatusId; + } + set + { + this.OnStatusIdChanging(value); + this.ReportPropertyChanging("StatusId"); + this._StatusId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("StatusId"); + this.OnStatusIdChanged(); + } + } + private global::System.Nullable _StatusId; + partial void OnStatusIdChanging(global::System.Nullable value); + partial void OnStatusIdChanged(); + /// + /// There are no comments for UserDetails in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserDetails_FK", "UserDetails")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public UserDetails UserDetails + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "UserDetails").Value; + } + set + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "UserDetails").Value = value; + } + } + /// + /// There are no comments for UserDetails in the schema. + /// + [global::System.ComponentModel.BrowsableAttribute(false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityReference UserDetailsReference + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "UserDetails"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("XmlTest.UserDetails_FK", "UserDetails", value); + } + } + } + /// + /// There are no comments for UserToken in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserToken_FK", "UserToken")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public UserToken UserToken + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "UserToken").Value; + } + set + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "UserToken").Value = value; + } + } + /// + /// There are no comments for UserToken in the schema. + /// + [global::System.ComponentModel.BrowsableAttribute(false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityReference UserTokenReference + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "UserToken"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("XmlTest.UserToken_FK", "UserToken", value); + } + } + } + } + /// + /// There are no comments for XmlTest.UserDetails in the schema. + /// + /// + /// UserId + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="UserDetails")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class UserDetails : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new UserDetails object. + /// + /// Initial value of UserId. + public static UserDetails CreateUserDetails(int userId) + { + UserDetails userDetails = new UserDetails(); + userDetails.UserId = userId; + return userDetails; + } + /// + /// There are no comments for Property UserId in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int UserId + { + get + { + return this._UserId; + } + set + { + this.OnUserIdChanging(value); + this.ReportPropertyChanging("UserId"); + this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + private int _UserId; + partial void OnUserIdChanging(int value); + partial void OnUserIdChanged(); + /// + /// There are no comments for Property Details in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Details + { + get + { + return this._Details; + } + set + { + this.OnDetailsChanging(value); + this.ReportPropertyChanging("Details"); + this._Details = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("Details"); + this.OnDetailsChanged(); + } + } + private string _Details; + partial void OnDetailsChanging(string value); + partial void OnDetailsChanged(); + /// + /// There are no comments for User in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserDetails_FK", "User")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public User User + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "User").Value; + } + set + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "User").Value = value; + } + } + /// + /// There are no comments for User in the schema. + /// + [global::System.ComponentModel.BrowsableAttribute(false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityReference UserReference + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserDetails_FK", "User"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("XmlTest.UserDetails_FK", "User", value); + } + } + } + } + /// + /// There are no comments for XmlTest.UserToken in the schema. + /// + /// + /// UserId + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="UserToken")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class UserToken : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new UserToken object. + /// + /// Initial value of UserId. + public static UserToken CreateUserToken(int userId) + { + UserToken userToken = new UserToken(); + userToken.UserId = userId; + return userToken; + } + /// + /// There are no comments for Property UserId in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int UserId + { + get + { + return this._UserId; + } + set + { + this.OnUserIdChanging(value); + this.ReportPropertyChanging("UserId"); + this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + private int _UserId; + partial void OnUserIdChanging(int value); + partial void OnUserIdChanged(); + /// + /// There are no comments for Property Token in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string Token + { + get + { + return this._Token; + } + set + { + this.OnTokenChanging(value); + this.ReportPropertyChanging("Token"); + this._Token = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("Token"); + this.OnTokenChanged(); + } + } + private string _Token; + partial void OnTokenChanging(string value); + partial void OnTokenChanged(); + /// + /// There are no comments for User in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserToken_FK", "User")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public User User + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "User").Value; + } + set + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "User").Value = value; + } + } + /// + /// There are no comments for User in the schema. + /// + [global::System.ComponentModel.BrowsableAttribute(false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityReference UserReference + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("XmlTest.UserToken_FK", "User"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("XmlTest.UserToken_FK", "User", value); + } + } + } + } + /// + /// There are no comments for XmlTest.XmlTable in the schema. + /// + /// + /// key + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="XmlTable")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class XmlTable : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new XmlTable object. + /// + /// Initial value of key. + public static XmlTable CreateXmlTable(int key) + { + XmlTable xmlTable = new XmlTable(); + xmlTable.key = key; + return xmlTable; + } + /// + /// There are no comments for Property key in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public int key + { + get + { + return this._key; + } + set + { + this.OnkeyChanging(value); + this.ReportPropertyChanging("key"); + this._key = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("key"); + this.OnkeyChanged(); + } + } + private int _key; + partial void OnkeyChanging(int value); + partial void OnkeyChanged(); + /// + /// There are no comments for Property test_xml in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string test_xml + { + get + { + return this._test_xml; + } + set + { + this.Ontest_xmlChanging(value); + this.ReportPropertyChanging("test_xml"); + this._test_xml = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("test_xml"); + this.Ontest_xmlChanged(); + } + } + private string _test_xml; + partial void Ontest_xmlChanging(string value); + partial void Ontest_xmlChanged(); + } + /// + /// There are no comments for XmlTest.dispViews in the schema. + /// + /// + /// ViewName + /// MdsIdPlatformId + /// + [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="dispViews")] + [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] + [global::System.Serializable()] + public partial class dispViews : global::System.Data.Objects.DataClasses.EntityObject + { + /// + /// Create a new dispViews object. + /// + /// Initial value of ViewName. + /// Initial value of MdsIdPlatformId. + public static dispViews CreatedispViews(string viewName, string mdsIdPlatformId) + { + dispViews dispViews = new dispViews(); + dispViews.ViewName = viewName; + dispViews.MdsIdPlatformId = mdsIdPlatformId; + return dispViews; + } + /// + /// There are no comments for Property ViewName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string ViewName + { + get + { + return this._ViewName; + } + set + { + this.OnViewNameChanging(value); + this.ReportPropertyChanging("ViewName"); + this._ViewName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); + this.ReportPropertyChanged("ViewName"); + this.OnViewNameChanged(); + } + } + private string _ViewName; + partial void OnViewNameChanging(string value); + partial void OnViewNameChanged(); + /// + /// There are no comments for Property MdsIdPlatformId in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string MdsIdPlatformId + { + get + { + return this._MdsIdPlatformId; + } + set + { + this.OnMdsIdPlatformIdChanging(value); + this.ReportPropertyChanging("MdsIdPlatformId"); + this._MdsIdPlatformId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); + this.ReportPropertyChanged("MdsIdPlatformId"); + this.OnMdsIdPlatformIdChanged(); + } + } + private string _MdsIdPlatformId; + partial void OnMdsIdPlatformIdChanging(string value); + partial void OnMdsIdPlatformIdChanged(); + /// + /// There are no comments for Property DisplayName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string DisplayName + { + get + { + return this._DisplayName; + } + set + { + this.OnDisplayNameChanging(value); + this.ReportPropertyChanging("DisplayName"); + this._DisplayName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("DisplayName"); + this.OnDisplayNameChanged(); + } + } + private string _DisplayName; + partial void OnDisplayNameChanging(string value); + partial void OnDisplayNameChanged(); + /// + /// There are no comments for Property ImageFileName in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public string ImageFileName + { + get + { + return this._ImageFileName; + } + set + { + this.OnImageFileNameChanging(value); + this.ReportPropertyChanging("ImageFileName"); + this._ImageFileName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); + this.ReportPropertyChanged("ImageFileName"); + this.OnImageFileNameChanged(); + } + } + private string _ImageFileName; + partial void OnImageFileNameChanging(string value); + partial void OnImageFileNameChanged(); + /// + /// There are no comments for dispViews1 in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "dispTargetViews", "dispViews1")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityCollection dispViews1 + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("XmlTest.dispTargetViews", "dispViews1"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("XmlTest.dispTargetViews", "dispViews1", value); + } + } + } + /// + /// There are no comments for dispViews2 in the schema. + /// + [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "dispTargetViews", "dispViews")] + [global::System.Xml.Serialization.XmlIgnoreAttribute()] + [global::System.Xml.Serialization.SoapIgnoreAttribute()] + [global::System.Runtime.Serialization.DataMemberAttribute()] + public global::System.Data.Objects.DataClasses.EntityCollection dispViews2 + { + get + { + return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("XmlTest.dispTargetViews", "dispViews"); + } + set + { + if ((value != null)) + { + ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("XmlTest.dispTargetViews", "dispViews", value); + } + } + } + } +} diff --git a/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.Views.cs b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.Views.cs new file mode 100644 index 0000000000..3a53907313 --- /dev/null +++ b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.Views.cs @@ -0,0 +1,488 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +[assembly: System.Data.Mapping.EntityViewGenerationAttribute(typeof(Edm_EntityMappingGeneratedViews.ViewsForBaseEntitySets32CD194B04BDC9F607C67C8FAB6BC4DC))] + +namespace Edm_EntityMappingGeneratedViews +{ + + + /// + /// The type contains views for EntitySets and AssociationSets that were generated at design time. + /// + public sealed class ViewsForBaseEntitySets32CD194B04BDC9F607C67C8FAB6BC4DC : System.Data.Mapping.EntityViewContainer + { + + /// + /// The constructor stores the views for the extents and also the hash values generated based on the metadata and mapping closure and views + /// + public ViewsForBaseEntitySets32CD194B04BDC9F607C67C8FAB6BC4DC() + { + this.EdmEntityContainerName = "XmlTestContext"; + this.StoreEntityContainerName = "XmlTestStoreContainer"; + this.HashOverMappingClosure = "f1b01cb63d8b711866cfe7ecbfa9367e"; + this.HashOverAllExtentViews = "b0c3118d79b4c037f19c708219fdab28"; + this.ViewCount = 19; + } + + // The method returns the view for the index given. + protected override System.Collections.Generic.KeyValuePair GetViewAt(int index) + { + if ((index == 0)) + { + // return view for XmlTestStoreContainer.Customer + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.Customer", "\r\n SELECT VALUE -- Constructing Customer\r\n [XmlTest.Store].Customer(T1." + + "Customer_OrderID, T1.Customer_NameStyle, T1.Customer_FirstName, T1.Customer_Last" + + "Name, T1.Customer_Active, T1.Customer_ModifiedDate, T1.Customer_TourNumber, T1.C" + + "ustomer_ExternalNumber, T1.Customer_MainPhone1, T1.Customer_MainPhone2, T1.Custo" + + "mer_PreOrderID, T1.Customer_LastVisit, T1.Customer_Created, T1.Customer_External" + + "Name, T1.Customer_NewCustomer, T1.Customer_Potential, T1.Customer_CustomerID, T1" + + ".Customer_OldExternalNumber, T1.Customer_OldTourNumber, T1.Customer_NewAssigned," + + " T1.Customer_OldActive, T1.Customer_StartDate, T1.Customer_Total)\r\n FROM (\r\n " + + " SELECT \r\n T.OrderID AS Customer_OrderID, \r\n T.NameS" + + "tyle AS Customer_NameStyle, \r\n T.FirstName AS Customer_FirstName, \r\n " + + " T.LastName AS Customer_LastName, \r\n T.Active AS Customer_A" + + "ctive, \r\n T.ModifiedDate AS Customer_ModifiedDate, \r\n T.To" + + "urNumber AS Customer_TourNumber, \r\n T.ExternalNumber AS Customer_Exte" + + "rnalNumber, \r\n T.MainPhone1 AS Customer_MainPhone1, \r\n T.M" + + "ainPhone2 AS Customer_MainPhone2, \r\n T.PreOrderID AS Customer_PreOrde" + + "rID, \r\n T.LastVisit AS Customer_LastVisit, \r\n T.Created AS" + + " Customer_Created, \r\n T.ExternalName AS Customer_ExternalName, \r\n " + + " T.NewCustomer AS Customer_NewCustomer, \r\n T.Potential AS Cust" + + "omer_Potential, \r\n T.CustomerID AS Customer_CustomerID, \r\n " + + " T.OldExternalNumber AS Customer_OldExternalNumber, \r\n T.OldTourNumbe" + + "r AS Customer_OldTourNumber, \r\n T.NewAssigned AS Customer_NewAssigned" + + ", \r\n T.OldActive AS Customer_OldActive, \r\n T.StartDate AS " + + "Customer_StartDate, \r\n T.Total AS Customer_Total, \r\n True " + + "AS _from0\r\n FROM XmlTestContext.Customer AS T\r\n ) AS T1"); + } + else + { + if ((index == 1)) + { + // return view for XmlTestStoreContainer.SalesOrderHeader + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.SalesOrderHeader", "\r\n SELECT VALUE -- Constructing SalesOrderHeader\r\n [XmlTest.Store].Sale" + + "sOrderHeader(T3.SalesOrderHeader_OrderDate, T3.SalesOrderHeader_Status, T3.Sales" + + "OrderHeader_BillToAddressID, T3.SalesOrderHeader_SubTotal, T3.SalesOrderHeader_T" + + "otalDue, T3.SalesOrderHeader_Comment, T3.SalesOrderHeader_ModifiedDate, T3.Sales" + + "OrderHeader_PaymentVersion, T3.SalesOrderHeader_BillID, T3.SalesOrderHeader_Book" + + "Counter, T3.SalesOrderHeader_SendID, T3.SalesOrderHeader_SubSubTotal, T3.SalesOr" + + "derHeader_PriceRabatt15, T3.SalesOrderHeader_Total, T3.SalesOrderHeader_Discount" + + ", T3.SalesOrderHeader_Rabatt, T3.SalesOrderHeader_OrderID, T3.SalesOrderHeader_S" + + "endDate, T3.SalesOrderHeader_ID, T3.SalesOrderHeader_Saison)\r\n FROM (\r\n " + + " SELECT T2.SalesOrderHeader_OrderDate, T2.SalesOrderHeader_Status, T2.SalesOrde" + + "rHeader_BillToAddressID, T2.SalesOrderHeader_SubTotal, T2.SalesOrderHeader_Total" + + "Due, T2.SalesOrderHeader_Comment, T2.SalesOrderHeader_ModifiedDate, T2.SalesOrde" + + "rHeader_PaymentVersion, T2.SalesOrderHeader_BillID, T2.SalesOrderHeader_BookCoun" + + "ter, T2.SalesOrderHeader_SendID, T2.SalesOrderHeader_SubSubTotal, T2.SalesOrderH" + + "eader_PriceRabatt15, T2.SalesOrderHeader_Total, T2.SalesOrderHeader_Discount, T2" + + ".SalesOrderHeader_Rabatt, T1.SalesOrderHeader_OrderID, T2.SalesOrderHeader_SendD" + + "ate, T1.SalesOrderHeader_ID, T2.SalesOrderHeader_Saison, T2._from0, T1._from1\r\n " + + " FROM (\r\n SELECT \r\n Key(T.Customer).OrderID AS " + + "SalesOrderHeader_OrderID, \r\n Key(T.SalesOrderHeader).ID AS SalesO" + + "rderHeader_ID, \r\n True AS _from1\r\n FROM XmlTestContext" + + ".SalesOrderHeader_OrderID_fkey AS T) AS T1\r\n INNER JOIN (\r\n " + + " SELECT \r\n T.OrderDate AS SalesOrderHeader_OrderDate, \r\n " + + " T.Status AS SalesOrderHeader_Status, \r\n T.BillToAddressID" + + " AS SalesOrderHeader_BillToAddressID, \r\n T.SubTotal AS SalesOrder" + + "Header_SubTotal, \r\n T.TotalDue AS SalesOrderHeader_TotalDue, \r\n " + + " T.Comment AS SalesOrderHeader_Comment, \r\n T.Modifie" + + "dDate AS SalesOrderHeader_ModifiedDate, \r\n T.PaymentVersion AS Sa" + + "lesOrderHeader_PaymentVersion, \r\n T.BillID AS SalesOrderHeader_Bi" + + "llID, \r\n T.BookCounter AS SalesOrderHeader_BookCounter, \r\n " + + " T.SendID AS SalesOrderHeader_SendID, \r\n T.SubSubTotal AS" + + " SalesOrderHeader_SubSubTotal, \r\n T.PriceRabatt15 AS SalesOrderHe" + + "ader_PriceRabatt15, \r\n T.Total AS SalesOrderHeader_Total, \r\n " + + " T.Discount AS SalesOrderHeader_Discount, \r\n T.Rabatt A" + + "S SalesOrderHeader_Rabatt, \r\n T.SendDate AS SalesOrderHeader_Send" + + "Date, \r\n T.ID AS SalesOrderHeader_ID, \r\n T.Saison " + + "AS SalesOrderHeader_Saison, \r\n True AS _from0\r\n FROM X" + + "mlTestContext.SalesOrderHeader AS T) AS T2\r\n ON T1.SalesOrderHeader_I" + + "D = T2.SalesOrderHeader_ID\r\n ) AS T3"); + } + else + { + if ((index == 2)) + { + // return view for XmlTestContext.Customer + return new System.Collections.Generic.KeyValuePair("XmlTestContext.Customer", "\r\n SELECT VALUE -- Constructing Customer\r\n XmlTest.Customer(T1.Customer" + + "_OrderID, T1.Customer_NameStyle, T1.Customer_FirstName, T1.Customer_LastName, T1" + + ".Customer_Active, T1.Customer_ModifiedDate, T1.Customer_TourNumber, T1.Customer_" + + "ExternalNumber, T1.Customer_MainPhone1, T1.Customer_MainPhone2, T1.Customer_PreO" + + "rderID, T1.Customer_LastVisit, T1.Customer_Created, T1.Customer_ExternalName, T1" + + ".Customer_NewCustomer, T1.Customer_Potential, T1.Customer_CustomerID, T1.Custome" + + "r_OldExternalNumber, T1.Customer_OldTourNumber, T1.Customer_NewAssigned, T1.Cust" + + "omer_OldActive, T1.Customer_StartDate, T1.Customer_Total)\r\n FROM (\r\n S" + + "ELECT \r\n T.OrderID AS Customer_OrderID, \r\n T.NameStyle AS " + + "Customer_NameStyle, \r\n T.FirstName AS Customer_FirstName, \r\n " + + " T.LastName AS Customer_LastName, \r\n T.Active AS Customer_Active, \r" + + "\n T.ModifiedDate AS Customer_ModifiedDate, \r\n T.TourNumber" + + " AS Customer_TourNumber, \r\n T.ExternalNumber AS Customer_ExternalNumb" + + "er, \r\n T.MainPhone1 AS Customer_MainPhone1, \r\n T.MainPhone" + + "2 AS Customer_MainPhone2, \r\n T.PreOrderID AS Customer_PreOrderID, \r\n " + + " T.LastVisit AS Customer_LastVisit, \r\n T.Created AS Custome" + + "r_Created, \r\n T.ExternalName AS Customer_ExternalName, \r\n " + + "T.NewCustomer AS Customer_NewCustomer, \r\n T.Potential AS Customer_Pot" + + "ential, \r\n T.CustomerID AS Customer_CustomerID, \r\n T.OldEx" + + "ternalNumber AS Customer_OldExternalNumber, \r\n T.OldTourNumber AS Cus" + + "tomer_OldTourNumber, \r\n T.NewAssigned AS Customer_NewAssigned, \r\n " + + " T.OldActive AS Customer_OldActive, \r\n T.StartDate AS Customer" + + "_StartDate, \r\n T.Total AS Customer_Total, \r\n True AS _from" + + "0\r\n FROM XmlTestStoreContainer.Customer AS T\r\n ) AS T1"); + } + else + { + if ((index == 3)) + { + // return view for XmlTestContext.SalesOrderHeader + return new System.Collections.Generic.KeyValuePair("XmlTestContext.SalesOrderHeader", "\r\n SELECT VALUE -- Constructing SalesOrderHeader\r\n XmlTest.SalesOrderHe" + + "ader(T1.SalesOrderHeader_OrderDate, T1.SalesOrderHeader_Status, T1.SalesOrderHea" + + "der_BillToAddressID, T1.SalesOrderHeader_SubTotal, T1.SalesOrderHeader_TotalDue," + + " T1.SalesOrderHeader_Comment, T1.SalesOrderHeader_ModifiedDate, T1.SalesOrderHea" + + "der_PaymentVersion, T1.SalesOrderHeader_BillID, T1.SalesOrderHeader_BookCounter," + + " T1.SalesOrderHeader_SendID, T1.SalesOrderHeader_SubSubTotal, T1.SalesOrderHeade" + + "r_PriceRabatt15, T1.SalesOrderHeader_Total, T1.SalesOrderHeader_Discount, T1.Sal" + + "esOrderHeader_Rabatt, T1.SalesOrderHeader_SendDate, T1.SalesOrderHeader_ID, T1.S" + + "alesOrderHeader_Saison) WITH \r\n RELATIONSHIP(CREATEREF(XmlTestContext.Cus" + + "tomer, ROW(T1.[SalesOrderHeader_OrderID_fkey.Customer.OrderID]),XmlTest.Customer" + + "),XmlTest.SalesOrderHeader_OrderID_fkey,SalesOrderHeader,Customer) \r\n FROM (\r" + + "\n SELECT \r\n T.OrderDate AS SalesOrderHeader_OrderDate, \r\n " + + " T.Status AS SalesOrderHeader_Status, \r\n T.BillToAddressID AS S" + + "alesOrderHeader_BillToAddressID, \r\n T.SubTotal AS SalesOrderHeader_Su" + + "bTotal, \r\n T.TotalDue AS SalesOrderHeader_TotalDue, \r\n T.C" + + "omment AS SalesOrderHeader_Comment, \r\n T.ModifiedDate AS SalesOrderHe" + + "ader_ModifiedDate, \r\n T.PaymentVersion AS SalesOrderHeader_PaymentVer" + + "sion, \r\n T.BillID AS SalesOrderHeader_BillID, \r\n T.BookCou" + + "nter AS SalesOrderHeader_BookCounter, \r\n T.SendID AS SalesOrderHeader" + + "_SendID, \r\n T.SubSubTotal AS SalesOrderHeader_SubSubTotal, \r\n " + + " T.PriceRabatt15 AS SalesOrderHeader_PriceRabatt15, \r\n T.Total AS " + + "SalesOrderHeader_Total, \r\n T.Discount AS SalesOrderHeader_Discount, \r" + + "\n T.Rabatt AS SalesOrderHeader_Rabatt, \r\n T.SendDate AS Sa" + + "lesOrderHeader_SendDate, \r\n T.ID AS SalesOrderHeader_ID, \r\n " + + " T.Saison AS SalesOrderHeader_Saison, \r\n True AS _from0, \r\n " + + " T.OrderID AS [SalesOrderHeader_OrderID_fkey.Customer.OrderID]\r\n FROM X" + + "mlTestStoreContainer.SalesOrderHeader AS T\r\n ) AS T1"); + } + else + { + if ((index == 4)) + { + // return view for XmlTestContext.SalesOrderHeader_OrderID_fkey + return new System.Collections.Generic.KeyValuePair("XmlTestContext.SalesOrderHeader_OrderID_fkey", @" + SELECT VALUE -- Constructing SalesOrderHeader_OrderID_fkey + XmlTest.SalesOrderHeader_OrderID_fkey(T3.[SalesOrderHeader_OrderID_fkey.Customer], T3.[SalesOrderHeader_OrderID_fkey.SalesOrderHeader]) + FROM ( + SELECT -- Constructing Customer + CreateRef(XmlTestContext.Customer, row(T2.[SalesOrderHeader_OrderID_fkey.Customer.OrderID]),XmlTest.Customer) AS [SalesOrderHeader_OrderID_fkey.Customer], + T2.[SalesOrderHeader_OrderID_fkey.SalesOrderHeader] + FROM ( + SELECT -- Constructing SalesOrderHeader + CreateRef(XmlTestContext.SalesOrderHeader, row(T1.[SalesOrderHeader_OrderID_fkey.SalesOrderHeader.ID]),XmlTest.SalesOrderHeader) AS [SalesOrderHeader_OrderID_fkey.SalesOrderHeader], + T1.[SalesOrderHeader_OrderID_fkey.Customer.OrderID] + FROM ( + SELECT + T.OrderID AS [SalesOrderHeader_OrderID_fkey.Customer.OrderID], + T.ID AS [SalesOrderHeader_OrderID_fkey.SalesOrderHeader.ID], + True AS _from0 + FROM XmlTestStoreContainer.SalesOrderHeader AS T + ) AS T1 + ) AS T2 + ) AS T3"); + } + else + { + if ((index == 5)) + { + // return view for XmlTestStoreContainer.User + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.User", @" + SELECT VALUE -- Constructing User + [XmlTest.Store].User(T1.User_UserId, T1.User_Name, T1.User_Login, T1.User_StatusId) + FROM ( + SELECT + T.UserId AS User_UserId, + T.Name AS User_Name, + T.Login AS User_Login, + T.StatusId AS User_StatusId, + True AS _from0 + FROM XmlTestContext.User AS T + ) AS T1"); + } + else + { + if ((index == 6)) + { + // return view for XmlTestStoreContainer.UserDetails + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.UserDetails", @" + SELECT VALUE -- Constructing UserDetails + [XmlTest.Store].UserDetails(T1.UserDetails_UserId, T1.UserDetails_Details) + FROM ( + SELECT + T.UserId AS UserDetails_UserId, + T.Details AS UserDetails_Details, + True AS _from0 + FROM XmlTestContext.UserDetails AS T + ) AS T1"); + } + else + { + if ((index == 7)) + { + // return view for XmlTestStoreContainer.UserToken + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.UserToken", @" + SELECT VALUE -- Constructing UserToken + [XmlTest.Store].UserToken(T1.UserToken_UserId, T1.UserToken_Token) + FROM ( + SELECT + T.UserId AS UserToken_UserId, + T.Token AS UserToken_Token, + True AS _from0 + FROM XmlTestContext.UserToken AS T + ) AS T1"); + } + else + { + if ((index == 8)) + { + // return view for XmlTestContext.User + return new System.Collections.Generic.KeyValuePair("XmlTestContext.User", @" + SELECT VALUE -- Constructing User + XmlTest.User(T1.User_UserId, T1.User_Name, T1.User_Login, T1.User_StatusId) + FROM ( + SELECT + T.UserId AS User_UserId, + T.Name AS User_Name, + T.Login AS User_Login, + T.StatusId AS User_StatusId, + True AS _from0 + FROM XmlTestStoreContainer.User AS T + ) AS T1"); + } + else + { + if ((index == 9)) + { + // return view for XmlTestContext.UserDetails + return new System.Collections.Generic.KeyValuePair("XmlTestContext.UserDetails", @" + SELECT VALUE -- Constructing UserDetails + XmlTest.UserDetails(T1.UserDetails_UserId, T1.UserDetails_Details) + FROM ( + SELECT + T.UserId AS UserDetails_UserId, + T.Details AS UserDetails_Details, + True AS _from0, + T.UserId AS [UserDetails_FK.UserDetails.UserId] + FROM XmlTestStoreContainer.UserDetails AS T + ) AS T1"); + } + else + { + if ((index == 10)) + { + // return view for XmlTestContext.UserToken + return new System.Collections.Generic.KeyValuePair("XmlTestContext.UserToken", @" + SELECT VALUE -- Constructing UserToken + XmlTest.UserToken(T1.UserToken_UserId, T1.UserToken_Token) + FROM ( + SELECT + T.UserId AS UserToken_UserId, + T.Token AS UserToken_Token, + True AS _from0, + T.UserId AS [UserToken_FK.UserToken.UserId] + FROM XmlTestStoreContainer.UserToken AS T + ) AS T1"); + } + else + { + if ((index == 11)) + { + // return view for XmlTestContext.UserDetails_FK + return new System.Collections.Generic.KeyValuePair("XmlTestContext.UserDetails_FK", @" + SELECT VALUE -- Constructing UserDetails_FK + XmlTest.UserDetails_FK(T3.[UserDetails_FK.User], T3.[UserDetails_FK.UserDetails]) + FROM ( + SELECT -- Constructing User + CreateRef(XmlTestContext.User, row(T2.[UserDetails_FK.User.UserId]),XmlTest.User) AS [UserDetails_FK.User], + T2.[UserDetails_FK.UserDetails] + FROM ( + SELECT -- Constructing UserDetails + CreateRef(XmlTestContext.UserDetails, row(T1.[UserDetails_FK.UserDetails.UserId]),XmlTest.UserDetails) AS [UserDetails_FK.UserDetails], + T1.[UserDetails_FK.User.UserId] + FROM ( + SELECT + T.UserId AS [UserDetails_FK.User.UserId], + T.UserId AS [UserDetails_FK.UserDetails.UserId], + True AS _from0 + FROM XmlTestStoreContainer.UserDetails AS T + ) AS T1 + ) AS T2 + ) AS T3"); + } + else + { + if ((index == 12)) + { + // return view for XmlTestContext.UserToken_FK + return new System.Collections.Generic.KeyValuePair("XmlTestContext.UserToken_FK", @" + SELECT VALUE -- Constructing UserToken_FK + XmlTest.UserToken_FK(T3.[UserToken_FK.User], T3.[UserToken_FK.UserToken]) + FROM ( + SELECT -- Constructing User + CreateRef(XmlTestContext.User, row(T2.[UserToken_FK.User.UserId]),XmlTest.User) AS [UserToken_FK.User], + T2.[UserToken_FK.UserToken] + FROM ( + SELECT -- Constructing UserToken + CreateRef(XmlTestContext.UserToken, row(T1.[UserToken_FK.UserToken.UserId]),XmlTest.UserToken) AS [UserToken_FK.UserToken], + T1.[UserToken_FK.User.UserId] + FROM ( + SELECT + T.UserId AS [UserToken_FK.User.UserId], + T.UserId AS [UserToken_FK.UserToken.UserId], + True AS _from0 + FROM XmlTestStoreContainer.UserToken AS T + ) AS T1 + ) AS T2 + ) AS T3"); + } + else + { + if ((index == 13)) + { + // return view for XmlTestStoreContainer.XmlTable + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.XmlTable", @" + SELECT VALUE -- Constructing XmlTable + [XmlTest.Store].XmlTable(T1.XmlTable_key, T1.[XmlTable.test_xml]) + FROM ( + SELECT + T.[key] AS XmlTable_key, + T.test_xml AS [XmlTable.test_xml], + True AS _from0 + FROM XmlTestContext.XmlTable AS T + ) AS T1"); + } + else + { + if ((index == 14)) + { + // return view for XmlTestContext.XmlTable + return new System.Collections.Generic.KeyValuePair("XmlTestContext.XmlTable", @" + SELECT VALUE -- Constructing XmlTable + XmlTest.XmlTable(T1.XmlTable_key, T1.[XmlTable.test_xml]) + FROM ( + SELECT + T.[key] AS XmlTable_key, + T.test_xml AS [XmlTable.test_xml], + True AS _from0 + FROM XmlTestStoreContainer.XmlTable AS T + ) AS T1"); + } + else + { + if ((index == 15)) + { + // return view for XmlTestStoreContainer.dispViews + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.dispViews", @" + SELECT VALUE -- Constructing dispViews + [XmlTest.Store].dispViews(T1.dispViews_ViewName, T1.dispViews_MdsIdPlatformId, T1.dispViews_DisplayName, T1.dispViews_ImageFileName) + FROM ( + SELECT + T.ViewName AS dispViews_ViewName, + T.MdsIdPlatformId AS dispViews_MdsIdPlatformId, + T.DisplayName AS dispViews_DisplayName, + T.ImageFileName AS dispViews_ImageFileName, + True AS _from0 + FROM XmlTestContext.dispViews AS T + ) AS T1"); + } + else + { + if ((index == 16)) + { + // return view for XmlTestStoreContainer.dispTargetViews + return new System.Collections.Generic.KeyValuePair("XmlTestStoreContainer.dispTargetViews", @" + SELECT VALUE -- Constructing dispTargetViews + [XmlTest.Store].dispTargetViews(T1.dispTargetViews_ViewName, T1.dispTargetViews_MdsIdPlatformId, T1.dispTargetViews_TargetViewName, T1.dispTargetViews_TargetMdsIdPlatformId) + FROM ( + SELECT + Key(T.dispViews).ViewName AS dispTargetViews_ViewName, + Key(T.dispViews).MdsIdPlatformId AS dispTargetViews_MdsIdPlatformId, + Key(T.dispViews1).ViewName AS dispTargetViews_TargetViewName, + Key(T.dispViews1).MdsIdPlatformId AS dispTargetViews_TargetMdsIdPlatformId, + True AS _from0 + FROM XmlTestContext.dispTargetViews AS T + ) AS T1"); + } + else + { + if ((index == 17)) + { + // return view for XmlTestContext.dispViews + return new System.Collections.Generic.KeyValuePair("XmlTestContext.dispViews", @" + SELECT VALUE -- Constructing dispViews + XmlTest.dispViews(T1.dispViews_ViewName, T1.dispViews_MdsIdPlatformId, T1.dispViews_DisplayName, T1.dispViews_ImageFileName) + FROM ( + SELECT + T.ViewName AS dispViews_ViewName, + T.MdsIdPlatformId AS dispViews_MdsIdPlatformId, + T.DisplayName AS dispViews_DisplayName, + T.ImageFileName AS dispViews_ImageFileName, + True AS _from0 + FROM XmlTestStoreContainer.dispViews AS T + ) AS T1"); + } + else + { + if ((index == 18)) + { + // return view for XmlTestContext.dispTargetViews + return new System.Collections.Generic.KeyValuePair("XmlTestContext.dispTargetViews", @" + SELECT VALUE -- Constructing dispTargetViews + XmlTest.dispTargetViews(T3.dispTargetViews_dispViews, T3.dispTargetViews_dispViews1) + FROM ( + SELECT -- Constructing dispViews + CreateRef(XmlTestContext.dispViews, row(T2.dispTargetViews_dispViews_ViewName, T2.dispTargetViews_dispViews_MdsIdPlatformId),XmlTest.dispViews) AS dispTargetViews_dispViews, + T2.dispTargetViews_dispViews1 + FROM ( + SELECT -- Constructing dispViews1 + CreateRef(XmlTestContext.dispViews, row(T1.dispTargetViews_dispViews1_ViewName, T1.dispTargetViews_dispViews1_MdsIdPlatformId),XmlTest.dispViews) AS dispTargetViews_dispViews1, + T1.dispTargetViews_dispViews_ViewName, T1.dispTargetViews_dispViews_MdsIdPlatformId + FROM ( + SELECT + T.ViewName AS dispTargetViews_dispViews_ViewName, + T.MdsIdPlatformId AS dispTargetViews_dispViews_MdsIdPlatformId, + T.TargetViewName AS dispTargetViews_dispViews1_ViewName, + T.TargetMdsIdPlatformId AS dispTargetViews_dispViews1_MdsIdPlatformId, + True AS _from0 + FROM XmlTestStoreContainer.dispTargetViews AS T + ) AS T1 + ) AS T2 + ) AS T3"); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + throw new System.IndexOutOfRangeException(); + } + } +} diff --git a/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.csdl b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.csdl new file mode 100644 index 0000000000..f8020103b7 --- /dev/null +++ b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.csdl @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.msl b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.msl new file mode 100644 index 0000000000..6f6edc5b5b --- /dev/null +++ b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.msl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ssdl b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ssdl new file mode 100644 index 0000000000..2a9d0d70d3 --- /dev/null +++ b/testsuite/noninteractive/NUnit20/xmlModel/XmlTest.ssdl @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/noninteractive/makeDB.bat b/testsuite/noninteractive/makeDB.bat index e715dece9a..a7c634981c 100644 --- a/testsuite/noninteractive/makeDB.bat +++ b/testsuite/noninteractive/makeDB.bat @@ -41,4 +41,4 @@ if not errorlevel 1 (echo OK) else (echo FAILED && exit /b 1) echo Adding test data... %PSQL% %NPGSQL_TEST_STRING% -f add_data.sql >> %NPGSQL_TESTS_LOG% 2>&1 -if not errorlevel 1 (echo OK) else (echo FAILED && exit /b 1) +if not errorlevel 1 (echo OK) else (echo FAILED && exit /b 1) \ No newline at end of file