aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DAL.Local/DB
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-11-27 20:35:08 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-11-27 20:35:08 +0200
commit7060dc80c707fc0441ff69fe4f899107cb3f6fc1 (patch)
treea72e2cf1be9fcce77e27446d93501bfc9b452265 /Software/Visual_Studio/Tango.DAL.Local/DB
parentd1038a08bdf51b1310be4ef00ebe9e21b0e12f81 (diff)
downloadTango-7060dc80c707fc0441ff69fe4f899107cb3f6fc1.tar.gz
Tango-7060dc80c707fc0441ff69fe4f899107cb3f6fc1.zip
Split DAL to DAl.Local & DAL.Remote due to ambiguity of table names in EF.
Implemented Unit testing for SQLite & SQL Server connections.
Diffstat (limited to 'Software/Visual_Studio/Tango.DAL.Local/DB')
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/ACTION.cs25
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/ADDRESS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSION.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATIONS_DISPENSERS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/CONTACT.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/EVENT.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/EVENTS_ACTIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHESIS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LIQUIDS_RML.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.cs63
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.tt636
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Designer.cs10
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.cs9
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx1074
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram45
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.tt733
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/USER.cs22
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/DB/USERS_ROLES.cs22
41 files changed, 3321 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION.cs
new file mode 100644
index 000000000..6bc2a9274
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION.cs
@@ -0,0 +1,25 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class ACTION
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ public long CODE { get; set; }
+ public string NAME { get; set; }
+ public string DESCRIPTION { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ADDRESS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ADDRESS.cs
new file mode 100644
index 000000000..808244106
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ADDRESS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class ADDRESS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs
new file mode 100644
index 000000000..3cf9cd3ce
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class APPLICATION_FIRMWARE_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs
new file mode 100644
index 000000000..a3d4afab8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class APPLICATION_OS_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSION.cs
new file mode 100644
index 000000000..1e745d1ac
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSION.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class APPLICATION_VERSION
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs
new file mode 100644
index 000000000..7acc1ee6b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class CONFIGURATION
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATIONS_DISPENSERS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATIONS_DISPENSERS.cs
new file mode 100644
index 000000000..3a289e206
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATIONS_DISPENSERS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class CONFIGURATIONS_DISPENSERS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CONTACT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CONTACT.cs
new file mode 100644
index 000000000..cf792d22d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CONTACT.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class CONTACT
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER.cs
new file mode 100644
index 000000000..211d141cb
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DISPENSER
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs
new file mode 100644
index 000000000..d44343495
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class EMBEDDED_FIRMWARE_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs
new file mode 100644
index 000000000..a0b0a7b22
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class EMBEDDED_SOFTWARE_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT.cs
new file mode 100644
index 000000000..f9c8837ac
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class EVENT
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENTS_ACTIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENTS_ACTIONS.cs
new file mode 100644
index 000000000..84bcb5f03
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENTS_ACTIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class EVENTS_ACTIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs
new file mode 100644
index 000000000..b90db2f5d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class FIBER_SHAPES
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHESIS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHESIS.cs
new file mode 100644
index 000000000..07f0375b6
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHESIS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class FIBER_SYNTHESIS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs
new file mode 100644
index 000000000..0ceb68f7c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class HARDWARE_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs
new file mode 100644
index 000000000..84cd28833
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class LINEAR_MASS_DENSITY_UNITS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID.cs
new file mode 100644
index 000000000..30028c84c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class LIQUID
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUIDS_RML.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUIDS_RML.cs
new file mode 100644
index 000000000..07f8ed49c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUIDS_RML.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class LIQUIDS_RML
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs
new file mode 100644
index 000000000..1a5119212
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class LIQUID_TYPES
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.cs
new file mode 100644
index 000000000..47b8dd69c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Data.Entity;
+ using System.Data.Entity.Infrastructure;
+
+ public partial class LocalDB : DbContext
+ {
+ public LocalDB()
+ : base("name=LocalDB")
+ {
+ }
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+ throw new UnintentionalCodeFirstException();
+ }
+
+ public virtual DbSet<ACTION> ACTIONS { get; set; }
+ public virtual DbSet<ADDRESS> ADDRESSES { get; set; }
+ public virtual DbSet<APPLICATION_FIRMWARE_VERSIONS> APPLICATION_FIRMWARE_VERSIONS { get; set; }
+ public virtual DbSet<APPLICATION_OS_VERSIONS> APPLICATION_OS_VERSIONS { get; set; }
+ public virtual DbSet<APPLICATION_VERSION> APPLICATION_VERSION { get; set; }
+ public virtual DbSet<CONFIGURATION> CONFIGURATIONS { get; set; }
+ public virtual DbSet<CONFIGURATIONS_DISPENSERS> CONFIGURATIONS_DISPENSERS { get; set; }
+ public virtual DbSet<CONTACT> CONTACTS { get; set; }
+ public virtual DbSet<DISPENSER> DISPENSERS { get; set; }
+ public virtual DbSet<EMBEDDED_FIRMWARE_VERSIONS> EMBEDDED_FIRMWARE_VERSIONS { get; set; }
+ public virtual DbSet<EMBEDDED_SOFTWARE_VERSIONS> EMBEDDED_SOFTWARE_VERSIONS { get; set; }
+ public virtual DbSet<EVENT> EVENTS { get; set; }
+ public virtual DbSet<EVENTS_ACTIONS> EVENTS_ACTIONS { get; set; }
+ public virtual DbSet<FIBER_SHAPES> FIBER_SHAPES { get; set; }
+ public virtual DbSet<FIBER_SYNTHESIS> FIBER_SYNTHESIS { get; set; }
+ public virtual DbSet<HARDWARE_VERSIONS> HARDWARE_VERSIONS { get; set; }
+ public virtual DbSet<LINEAR_MASS_DENSITY_UNITS> LINEAR_MASS_DENSITY_UNITS { get; set; }
+ public virtual DbSet<LIQUID_TYPES> LIQUID_TYPES { get; set; }
+ public virtual DbSet<LIQUID> LIQUIDS { get; set; }
+ public virtual DbSet<LIQUIDS_RML> LIQUIDS_RML { get; set; }
+ public virtual DbSet<MACHINE_VERSIONS> MACHINE_VERSIONS { get; set; }
+ public virtual DbSet<MACHINE> MACHINES { get; set; }
+ public virtual DbSet<MACHINES_EVENTS> MACHINES_EVENTS { get; set; }
+ public virtual DbSet<MEDIA_COLORS> MEDIA_COLORS { get; set; }
+ public virtual DbSet<MEDIA_CONDITIONS> MEDIA_CONDITIONS { get; set; }
+ public virtual DbSet<MEDIA_MATERIALS> MEDIA_MATERIALS { get; set; }
+ public virtual DbSet<MEDIA_PURPOSES> MEDIA_PURPOSES { get; set; }
+ public virtual DbSet<ORGANIZATION> ORGANIZATIONS { get; set; }
+ public virtual DbSet<PERMISSION> PERMISSIONS { get; set; }
+ public virtual DbSet<RML> RMLs { get; set; }
+ public virtual DbSet<ROLE> ROLES { get; set; }
+ public virtual DbSet<ROLES_PERMISSIONS> ROLES_PERMISSIONS { get; set; }
+ public virtual DbSet<USER> USERS { get; set; }
+ public virtual DbSet<USERS_ROLES> USERS_ROLES { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.tt b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.tt
new file mode 100644
index 000000000..058773afd
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Context.tt
@@ -0,0 +1,636 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"LocalADO.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
+var itemCollection = loader.CreateEdmItemCollection(inputFile);
+var modelNamespace = loader.GetModelNamespace(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
+if (container == null)
+{
+ return string.Empty;
+}
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+<#
+
+var codeNamespace = code.VsNamespaceSuggestion();
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#
+ PushIndent(" ");
+}
+
+#>
+using System;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+<#
+if (container.FunctionImports.Any())
+{
+#>
+using System.Data.Entity.Core.Objects;
+using System.Linq;
+<#
+}
+#>
+
+<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
+{
+ public <#=code.Escape(container)#>()
+ : base("name=<#=container.Name#>")
+ {
+<#
+if (!loader.IsLazyLoadingEnabled(container))
+{
+#>
+ this.Configuration.LazyLoadingEnabled = false;
+<#
+}
+
+foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
+{
+ // Note: the DbSet members are defined below such that the getter and
+ // setter always have the same accessibility as the DbSet definition
+ if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
+ {
+#>
+ <#=codeStringGenerator.DbSetInitializer(entitySet)#>
+<#
+ }
+}
+#>
+ }
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+ throw new UnintentionalCodeFirstException();
+ }
+
+<#
+ foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
+ {
+#>
+ <#=codeStringGenerator.DbSet(entitySet)#>
+<#
+ }
+
+ foreach (var edmFunction in container.FunctionImports)
+ {
+ WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
+ }
+#>
+}
+<#
+
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+ PopIndent();
+#>
+}
+<#
+}
+#>
+<#+
+
+private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+{
+ if (typeMapper.IsComposable(edmFunction))
+ {
+#>
+
+ [DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
+ <#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
+ {
+<#+
+ codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+ <#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
+ }
+<#+
+ }
+ else
+ {
+#>
+
+ <#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
+ {
+<#+
+ codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+ <#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
+ }
+<#+
+ if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
+ {
+ WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
+ }
+ }
+}
+
+public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
+{
+#>
+ var <#=name#> = <#=isNotNull#> ?
+ <#=notNullInit#> :
+ <#=nullInit#>;
+
+<#+
+}
+
+public const string TemplateId = "CSharp_DbContext_Context_EF6";
+
+public class CodeStringGenerator
+{
+ private readonly CodeGenerationTools _code;
+ private readonly TypeMapper _typeMapper;
+ private readonly MetadataTools _ef;
+
+ public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(typeMapper, "typeMapper");
+ ArgumentNotNull(ef, "ef");
+
+ _code = code;
+ _typeMapper = typeMapper;
+ _ef = ef;
+ }
+
+ public string Property(EdmProperty edmProperty)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ Accessibility.ForProperty(edmProperty),
+ _typeMapper.GetTypeName(edmProperty.TypeUsage),
+ _code.Escape(edmProperty),
+ _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+ _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+ }
+
+ public string NavigationProperty(NavigationProperty navProp)
+ {
+ var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+ navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+ _code.Escape(navProp),
+ _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+ _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+ }
+
+ public string AccessibilityAndVirtual(string accessibility)
+ {
+ return accessibility + (accessibility != "private" ? " virtual" : "");
+ }
+
+ public string EntityClassOpening(EntityType entity)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1}partial class {2}{3}",
+ Accessibility.ForType(entity),
+ _code.SpaceAfter(_code.AbstractOption(entity)),
+ _code.Escape(entity),
+ _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+ }
+
+ public string EnumOpening(SimpleType enumType)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} enum {1} : {2}",
+ Accessibility.ForType(enumType),
+ _code.Escape(enumType),
+ _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+ }
+
+ public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+ {
+ var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+ {
+ var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+ var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+ var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+ writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+ }
+ }
+
+ public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} IQueryable<{1}> {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ _code.Escape(edmFunction),
+ string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+ }
+
+ public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ edmFunction.NamespaceName,
+ edmFunction.Name,
+ string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+ _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+ }
+
+ public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+ if (includeMergeOption)
+ {
+ paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ _code.Escape(edmFunction),
+ paramList);
+ }
+
+ public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+ if (includeMergeOption)
+ {
+ callParams = ", mergeOption" + callParams;
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+ returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ edmFunction.Name,
+ callParams);
+ }
+
+ public string DbSet(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+ Accessibility.ForReadOnlyProperty(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType),
+ _code.Escape(entitySet));
+ }
+
+ public string DbSetInitializer(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} = Set<{1}>();",
+ _code.Escape(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType));
+ }
+
+ public string UsingDirectives(bool inHeader, bool includeCollections = true)
+ {
+ return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+ ? string.Format(
+ CultureInfo.InvariantCulture,
+ "{0}using System;{1}" +
+ "{2}",
+ inHeader ? Environment.NewLine : "",
+ includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+ inHeader ? "" : Environment.NewLine)
+ : "";
+ }
+}
+
+public class TypeMapper
+{
+ private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+ private readonly System.Collections.IList _errors;
+ private readonly CodeGenerationTools _code;
+ private readonly MetadataTools _ef;
+
+ public static string FixNamespaces(string typeName)
+ {
+ return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+ }
+
+ public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(ef, "ef");
+ ArgumentNotNull(errors, "errors");
+
+ _code = code;
+ _ef = ef;
+ _errors = errors;
+ }
+
+ public string GetTypeName(TypeUsage typeUsage)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+ }
+
+ public string GetTypeName(EdmType edmType)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+ }
+
+ public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, string modelNamespace)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+ {
+ if (edmType == null)
+ {
+ return null;
+ }
+
+ var collectionType = edmType as CollectionType;
+ if (collectionType != null)
+ {
+ return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+ }
+
+ var typeName = _code.Escape(edmType.MetadataProperties
+ .Where(p => p.Name == ExternalTypeNameAttributeName)
+ .Select(p => (string)p.Value)
+ .FirstOrDefault())
+ ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+ _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+ _code.Escape(edmType));
+
+ if (edmType is StructuralType)
+ {
+ return typeName;
+ }
+
+ if (edmType is SimpleType)
+ {
+ var clrType = UnderlyingClrType(edmType);
+ if (!IsEnumType(edmType))
+ {
+ typeName = _code.Escape(clrType);
+ }
+
+ typeName = FixNamespaces(typeName);
+
+ return clrType.IsValueType && isNullable == true ?
+ String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+ typeName;
+ }
+
+ throw new ArgumentException("edmType");
+ }
+
+ public Type UnderlyingClrType(EdmType edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ var primitiveType = edmType as PrimitiveType;
+ if (primitiveType != null)
+ {
+ return primitiveType.ClrEquivalentType;
+ }
+
+ if (IsEnumType(edmType))
+ {
+ return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+ }
+
+ return typeof(object);
+ }
+
+ public object GetEnumMemberValue(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var valueProperty = enumMember.GetType().GetProperty("Value");
+ return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+ }
+
+ public string GetEnumMemberName(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var nameProperty = enumMember.GetType().GetProperty("Name");
+ return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+ }
+
+ public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var membersProperty = enumType.GetType().GetProperty("Members");
+ return membersProperty != null
+ ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+ : Enumerable.Empty<MetadataItem>();
+ }
+
+ public bool EnumIsFlags(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+ return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+ }
+
+ public bool IsEnumType(GlobalItem edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ return edmType.GetType().Name == "EnumType";
+ }
+
+ public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+ }
+
+ public string CreateLiteral(object value)
+ {
+ if (value == null || value.GetType() != typeof(TimeSpan))
+ {
+ return _code.CreateLiteral(value);
+ }
+
+ return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+ }
+
+ public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+ {
+ ArgumentNotNull(types, "types");
+ ArgumentNotNull(sourceFile, "sourceFile");
+
+ var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+ if (types.Any(item => !hash.Add(item)))
+ {
+ _errors.Add(
+ new CompilerError(sourceFile, -1, -1, "6023",
+ String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+ return false;
+ }
+ return true;
+ }
+
+ public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+ {
+ return GetItemsToGenerate<SimpleType>(itemCollection)
+ .Where(e => IsEnumType(e));
+ }
+
+ public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+ {
+ return itemCollection
+ .OfType<T>()
+ .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+ .OrderBy(i => i.Name);
+ }
+
+ public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+ {
+ return itemCollection
+ .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+ .Select(g => GetGlobalItemName(g));
+ }
+
+ public string GetGlobalItemName(GlobalItem item)
+ {
+ if (item is EdmType)
+ {
+ return ((EdmType)item).Name;
+ }
+ else
+ {
+ return ((EntityContainer)item).Name;
+ }
+ }
+
+ public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type);
+ }
+
+ public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+ }
+
+ public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+ return returnParamsProperty == null
+ ? edmFunction.ReturnParameter
+ : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+ }
+
+ public bool IsComposable(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+ return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+ }
+
+ public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+ {
+ return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ }
+
+ public TypeUsage GetReturnType(EdmFunction edmFunction)
+ {
+ var returnParam = GetReturnParameter(edmFunction);
+ return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+ }
+
+ public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+ {
+ var returnType = GetReturnType(edmFunction);
+ return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+ }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+ if (arg == null)
+ {
+ throw new ArgumentNullException(name);
+ }
+}
+#> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Designer.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Designer.cs
new file mode 100644
index 000000000..81ec10f3f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.Designer.cs
@@ -0,0 +1,10 @@
+// T4 code generation is enabled for model 'D:\Development\Tango\Software\Visual_Studio\Tango.DAL.Local\DB\LocalADO.edmx'.
+// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
+// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
+// is open in the designer.
+
+// If no context and entity classes have been generated, it may be because you created an empty model but
+// have not yet chosen which version of Entity Framework to use. To generate a context class and entity
+// classes for your model, open the model in the designer, right-click on the designer surface, and
+// select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation
+// Item...'. \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.cs
new file mode 100644
index 000000000..7cc066228
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.cs
@@ -0,0 +1,9 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx
new file mode 100644
index 000000000..57e44c3ed
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx
@@ -0,0 +1,1074 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
+ <!-- EF Runtime content -->
+ <edmx:Runtime>
+ <!-- SSDL content -->
+ <edmx:StorageModels>
+ <Schema Namespace="LocalModel.Store" Provider="System.Data.SQLite.EF6" ProviderManifestToken="Data Source=D:\Development\Tango\Software\DB\Tango.db" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+ <EntityType Name="ACTIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ <Property Name="CODE" Type="integer" Nullable="false" />
+ <Property Name="NAME" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="DESCRIPTION" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ADDRESSES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_FIRMWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_OS_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_VERSION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONFIGURATIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONFIGURATIONS_DISPENSERS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONTACTS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="DISPENSERS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EMBEDDED_FIRMWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EMBEDDED_SOFTWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EVENTS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EVENTS_ACTIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="FIBER_SHAPES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="FIBER_SYNTHESIS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="HARDWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LINEAR_MASS_DENSITY_UNITS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUID_TYPES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUIDS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUIDS_RML">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINES_EVENTS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_COLORS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_CONDITIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_MATERIALS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_PURPOSES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ORGANIZATIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="PERMISSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="RML">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ROLES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ROLES_PERMISSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="USERS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityType Name="USERS_ROLES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="integer" Nullable="false" />
+ <Property Name="GUID" Type="nvarchar" MaxLength="2147483647" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime" Nullable="false" />
+ <Property Name="DELETED" Type="bit" Nullable="false" />
+ </EntityType>
+ <EntityContainer Name="LocalModelStoreContainer">
+ <EntitySet Name="ACTIONS" EntityType="Self.ACTIONS" store:Type="Tables" />
+ <EntitySet Name="ADDRESSES" EntityType="Self.ADDRESSES" store:Type="Tables" />
+ <EntitySet Name="APPLICATION_FIRMWARE_VERSIONS" EntityType="Self.APPLICATION_FIRMWARE_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="APPLICATION_OS_VERSIONS" EntityType="Self.APPLICATION_OS_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="APPLICATION_VERSION" EntityType="Self.APPLICATION_VERSION" store:Type="Tables" />
+ <EntitySet Name="CONFIGURATIONS" EntityType="Self.CONFIGURATIONS" store:Type="Tables" />
+ <EntitySet Name="CONFIGURATIONS_DISPENSERS" EntityType="Self.CONFIGURATIONS_DISPENSERS" store:Type="Tables" />
+ <EntitySet Name="CONTACTS" EntityType="Self.CONTACTS" store:Type="Tables" />
+ <EntitySet Name="DISPENSERS" EntityType="Self.DISPENSERS" store:Type="Tables" />
+ <EntitySet Name="EMBEDDED_FIRMWARE_VERSIONS" EntityType="Self.EMBEDDED_FIRMWARE_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="EMBEDDED_SOFTWARE_VERSIONS" EntityType="Self.EMBEDDED_SOFTWARE_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="EVENTS" EntityType="Self.EVENTS" store:Type="Tables" />
+ <EntitySet Name="EVENTS_ACTIONS" EntityType="Self.EVENTS_ACTIONS" store:Type="Tables" />
+ <EntitySet Name="FIBER_SHAPES" EntityType="Self.FIBER_SHAPES" store:Type="Tables" />
+ <EntitySet Name="FIBER_SYNTHESIS" EntityType="Self.FIBER_SYNTHESIS" store:Type="Tables" />
+ <EntitySet Name="HARDWARE_VERSIONS" EntityType="Self.HARDWARE_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="LINEAR_MASS_DENSITY_UNITS" EntityType="Self.LINEAR_MASS_DENSITY_UNITS" store:Type="Tables" />
+ <EntitySet Name="LIQUID_TYPES" EntityType="Self.LIQUID_TYPES" store:Type="Tables" />
+ <EntitySet Name="LIQUIDS" EntityType="Self.LIQUIDS" store:Type="Tables" />
+ <EntitySet Name="LIQUIDS_RML" EntityType="Self.LIQUIDS_RML" store:Type="Tables" />
+ <EntitySet Name="MACHINE_VERSIONS" EntityType="Self.MACHINE_VERSIONS" store:Type="Tables" />
+ <EntitySet Name="MACHINES" EntityType="Self.MACHINES" store:Type="Tables" />
+ <EntitySet Name="MACHINES_EVENTS" EntityType="Self.MACHINES_EVENTS" store:Type="Tables" />
+ <EntitySet Name="MEDIA_COLORS" EntityType="Self.MEDIA_COLORS" store:Type="Tables" />
+ <EntitySet Name="MEDIA_CONDITIONS" EntityType="Self.MEDIA_CONDITIONS" store:Type="Tables" />
+ <EntitySet Name="MEDIA_MATERIALS" EntityType="Self.MEDIA_MATERIALS" store:Type="Tables" />
+ <EntitySet Name="MEDIA_PURPOSES" EntityType="Self.MEDIA_PURPOSES" store:Type="Tables" />
+ <EntitySet Name="ORGANIZATIONS" EntityType="Self.ORGANIZATIONS" store:Type="Tables" />
+ <EntitySet Name="PERMISSIONS" EntityType="Self.PERMISSIONS" store:Type="Tables" />
+ <EntitySet Name="RML" EntityType="Self.RML" store:Type="Tables" />
+ <EntitySet Name="ROLES" EntityType="Self.ROLES" store:Type="Tables" />
+ <EntitySet Name="ROLES_PERMISSIONS" EntityType="Self.ROLES_PERMISSIONS" store:Type="Tables" />
+ <EntitySet Name="USERS" EntityType="Self.USERS" store:Type="Tables" />
+ <EntitySet Name="USERS_ROLES" EntityType="Self.USERS_ROLES" store:Type="Tables" />
+ </EntityContainer>
+ </Schema></edmx:StorageModels>
+ <!-- CSDL content -->
+ <edmx:ConceptualModels>
+ <Schema Namespace="LocalModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
+ <EntityContainer Name="LocalDB" annotation:LazyLoadingEnabled="true">
+ <EntitySet Name="ACTIONS" EntityType="LocalModel.ACTION" />
+ <EntitySet Name="ADDRESSES" EntityType="LocalModel.ADDRESS" />
+ <EntitySet Name="APPLICATION_FIRMWARE_VERSIONS" EntityType="LocalModel.APPLICATION_FIRMWARE_VERSIONS" />
+ <EntitySet Name="APPLICATION_OS_VERSIONS" EntityType="LocalModel.APPLICATION_OS_VERSIONS" />
+ <EntitySet Name="APPLICATION_VERSION" EntityType="LocalModel.APPLICATION_VERSION" />
+ <EntitySet Name="CONFIGURATIONS" EntityType="LocalModel.CONFIGURATION" />
+ <EntitySet Name="CONFIGURATIONS_DISPENSERS" EntityType="LocalModel.CONFIGURATIONS_DISPENSERS" />
+ <EntitySet Name="CONTACTS" EntityType="LocalModel.CONTACT" />
+ <EntitySet Name="DISPENSERS" EntityType="LocalModel.DISPENSER" />
+ <EntitySet Name="EMBEDDED_FIRMWARE_VERSIONS" EntityType="LocalModel.EMBEDDED_FIRMWARE_VERSIONS" />
+ <EntitySet Name="EMBEDDED_SOFTWARE_VERSIONS" EntityType="LocalModel.EMBEDDED_SOFTWARE_VERSIONS" />
+ <EntitySet Name="EVENTS" EntityType="LocalModel.EVENT" />
+ <EntitySet Name="EVENTS_ACTIONS" EntityType="LocalModel.EVENTS_ACTIONS" />
+ <EntitySet Name="FIBER_SHAPES" EntityType="LocalModel.FIBER_SHAPES" />
+ <EntitySet Name="FIBER_SYNTHESIS" EntityType="LocalModel.FIBER_SYNTHESIS" />
+ <EntitySet Name="HARDWARE_VERSIONS" EntityType="LocalModel.HARDWARE_VERSIONS" />
+ <EntitySet Name="LINEAR_MASS_DENSITY_UNITS" EntityType="LocalModel.LINEAR_MASS_DENSITY_UNITS" />
+ <EntitySet Name="LIQUID_TYPES" EntityType="LocalModel.LIQUID_TYPES" />
+ <EntitySet Name="LIQUIDS" EntityType="LocalModel.LIQUID" />
+ <EntitySet Name="LIQUIDS_RML" EntityType="LocalModel.LIQUIDS_RML" />
+ <EntitySet Name="MACHINE_VERSIONS" EntityType="LocalModel.MACHINE_VERSIONS" />
+ <EntitySet Name="MACHINES" EntityType="LocalModel.MACHINE" />
+ <EntitySet Name="MACHINES_EVENTS" EntityType="LocalModel.MACHINES_EVENTS" />
+ <EntitySet Name="MEDIA_COLORS" EntityType="LocalModel.MEDIA_COLORS" />
+ <EntitySet Name="MEDIA_CONDITIONS" EntityType="LocalModel.MEDIA_CONDITIONS" />
+ <EntitySet Name="MEDIA_MATERIALS" EntityType="LocalModel.MEDIA_MATERIALS" />
+ <EntitySet Name="MEDIA_PURPOSES" EntityType="LocalModel.MEDIA_PURPOSES" />
+ <EntitySet Name="ORGANIZATIONS" EntityType="LocalModel.ORGANIZATION" />
+ <EntitySet Name="PERMISSIONS" EntityType="LocalModel.PERMISSION" />
+ <EntitySet Name="RMLs" EntityType="LocalModel.RML" />
+ <EntitySet Name="ROLES" EntityType="LocalModel.ROLE" />
+ <EntitySet Name="ROLES_PERMISSIONS" EntityType="LocalModel.ROLES_PERMISSIONS" />
+ <EntitySet Name="USERS" EntityType="LocalModel.USER" />
+ <EntitySet Name="USERS_ROLES" EntityType="LocalModel.USERS_ROLES" />
+ </EntityContainer>
+ <EntityType Name="ACTION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ <Property Name="CODE" Type="Int64" Nullable="false" />
+ <Property Name="NAME" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ </EntityType>
+ <EntityType Name="ADDRESS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_FIRMWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_OS_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="APPLICATION_VERSION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONFIGURATION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONFIGURATIONS_DISPENSERS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="CONTACT">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="DISPENSER">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EMBEDDED_FIRMWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EMBEDDED_SOFTWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EVENT">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="EVENTS_ACTIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="FIBER_SHAPES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="FIBER_SYNTHESIS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="HARDWARE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LINEAR_MASS_DENSITY_UNITS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUID_TYPES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUID">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="LIQUIDS_RML">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINE_VERSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINE">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MACHINES_EVENTS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_COLORS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_CONDITIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_MATERIALS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="MEDIA_PURPOSES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ORGANIZATION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="PERMISSION">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="RML">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ROLE">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="ROLES_PERMISSIONS">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="USER">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="USERS_ROLES">
+ <Key>
+ <PropertyRef Name="ID" />
+ </Key>
+ <Property Name="ID" Type="Int64" Nullable="false" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="2147483647" FixedLength="false" Unicode="true" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" />
+ <Property Name="DELETED" Type="Boolean" Nullable="false" />
+ </EntityType>
+ </Schema>
+ </edmx:ConceptualModels>
+ <!-- C-S mapping content -->
+ <edmx:Mappings>
+ <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
+ <EntityContainerMapping StorageEntityContainer="LocalModelStoreContainer" CdmEntityContainer="LocalDB">
+ <EntitySetMapping Name="ACTIONS">
+ <EntityTypeMapping TypeName="LocalModel.ACTION">
+ <MappingFragment StoreEntitySet="ACTIONS">
+ <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" />
+ <ScalarProperty Name="NAME" ColumnName="NAME" />
+ <ScalarProperty Name="CODE" ColumnName="CODE" />
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="ADDRESSES">
+ <EntityTypeMapping TypeName="LocalModel.ADDRESS">
+ <MappingFragment StoreEntitySet="ADDRESSES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="APPLICATION_FIRMWARE_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.APPLICATION_FIRMWARE_VERSIONS">
+ <MappingFragment StoreEntitySet="APPLICATION_FIRMWARE_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="APPLICATION_OS_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.APPLICATION_OS_VERSIONS">
+ <MappingFragment StoreEntitySet="APPLICATION_OS_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="APPLICATION_VERSION">
+ <EntityTypeMapping TypeName="LocalModel.APPLICATION_VERSION">
+ <MappingFragment StoreEntitySet="APPLICATION_VERSION">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="CONFIGURATIONS">
+ <EntityTypeMapping TypeName="LocalModel.CONFIGURATION">
+ <MappingFragment StoreEntitySet="CONFIGURATIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="CONFIGURATIONS_DISPENSERS">
+ <EntityTypeMapping TypeName="LocalModel.CONFIGURATIONS_DISPENSERS">
+ <MappingFragment StoreEntitySet="CONFIGURATIONS_DISPENSERS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="CONTACTS">
+ <EntityTypeMapping TypeName="LocalModel.CONTACT">
+ <MappingFragment StoreEntitySet="CONTACTS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="DISPENSERS">
+ <EntityTypeMapping TypeName="LocalModel.DISPENSER">
+ <MappingFragment StoreEntitySet="DISPENSERS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="EMBEDDED_FIRMWARE_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.EMBEDDED_FIRMWARE_VERSIONS">
+ <MappingFragment StoreEntitySet="EMBEDDED_FIRMWARE_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="EMBEDDED_SOFTWARE_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.EMBEDDED_SOFTWARE_VERSIONS">
+ <MappingFragment StoreEntitySet="EMBEDDED_SOFTWARE_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="EVENTS">
+ <EntityTypeMapping TypeName="LocalModel.EVENT">
+ <MappingFragment StoreEntitySet="EVENTS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="EVENTS_ACTIONS">
+ <EntityTypeMapping TypeName="LocalModel.EVENTS_ACTIONS">
+ <MappingFragment StoreEntitySet="EVENTS_ACTIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="FIBER_SHAPES">
+ <EntityTypeMapping TypeName="LocalModel.FIBER_SHAPES">
+ <MappingFragment StoreEntitySet="FIBER_SHAPES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="FIBER_SYNTHESIS">
+ <EntityTypeMapping TypeName="LocalModel.FIBER_SYNTHESIS">
+ <MappingFragment StoreEntitySet="FIBER_SYNTHESIS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="HARDWARE_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.HARDWARE_VERSIONS">
+ <MappingFragment StoreEntitySet="HARDWARE_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="LINEAR_MASS_DENSITY_UNITS">
+ <EntityTypeMapping TypeName="LocalModel.LINEAR_MASS_DENSITY_UNITS">
+ <MappingFragment StoreEntitySet="LINEAR_MASS_DENSITY_UNITS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="LIQUID_TYPES">
+ <EntityTypeMapping TypeName="LocalModel.LIQUID_TYPES">
+ <MappingFragment StoreEntitySet="LIQUID_TYPES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="LIQUIDS">
+ <EntityTypeMapping TypeName="LocalModel.LIQUID">
+ <MappingFragment StoreEntitySet="LIQUIDS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="LIQUIDS_RML">
+ <EntityTypeMapping TypeName="LocalModel.LIQUIDS_RML">
+ <MappingFragment StoreEntitySet="LIQUIDS_RML">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MACHINE_VERSIONS">
+ <EntityTypeMapping TypeName="LocalModel.MACHINE_VERSIONS">
+ <MappingFragment StoreEntitySet="MACHINE_VERSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MACHINES">
+ <EntityTypeMapping TypeName="LocalModel.MACHINE">
+ <MappingFragment StoreEntitySet="MACHINES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MACHINES_EVENTS">
+ <EntityTypeMapping TypeName="LocalModel.MACHINES_EVENTS">
+ <MappingFragment StoreEntitySet="MACHINES_EVENTS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MEDIA_COLORS">
+ <EntityTypeMapping TypeName="LocalModel.MEDIA_COLORS">
+ <MappingFragment StoreEntitySet="MEDIA_COLORS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MEDIA_CONDITIONS">
+ <EntityTypeMapping TypeName="LocalModel.MEDIA_CONDITIONS">
+ <MappingFragment StoreEntitySet="MEDIA_CONDITIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MEDIA_MATERIALS">
+ <EntityTypeMapping TypeName="LocalModel.MEDIA_MATERIALS">
+ <MappingFragment StoreEntitySet="MEDIA_MATERIALS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="MEDIA_PURPOSES">
+ <EntityTypeMapping TypeName="LocalModel.MEDIA_PURPOSES">
+ <MappingFragment StoreEntitySet="MEDIA_PURPOSES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="ORGANIZATIONS">
+ <EntityTypeMapping TypeName="LocalModel.ORGANIZATION">
+ <MappingFragment StoreEntitySet="ORGANIZATIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="PERMISSIONS">
+ <EntityTypeMapping TypeName="LocalModel.PERMISSION">
+ <MappingFragment StoreEntitySet="PERMISSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="RMLs">
+ <EntityTypeMapping TypeName="LocalModel.RML">
+ <MappingFragment StoreEntitySet="RML">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="ROLES">
+ <EntityTypeMapping TypeName="LocalModel.ROLE">
+ <MappingFragment StoreEntitySet="ROLES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="ROLES_PERMISSIONS">
+ <EntityTypeMapping TypeName="LocalModel.ROLES_PERMISSIONS">
+ <MappingFragment StoreEntitySet="ROLES_PERMISSIONS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="USERS">
+ <EntityTypeMapping TypeName="LocalModel.USER">
+ <MappingFragment StoreEntitySet="USERS">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ <EntitySetMapping Name="USERS_ROLES">
+ <EntityTypeMapping TypeName="LocalModel.USERS_ROLES">
+ <MappingFragment StoreEntitySet="USERS_ROLES">
+ <ScalarProperty Name="DELETED" ColumnName="DELETED" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
+ </EntityContainerMapping>
+ </Mapping>
+ </edmx:Mappings>
+ </edmx:Runtime>
+ <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+ <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
+ <Connection>
+ <DesignerInfoPropertySet>
+ <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+ </DesignerInfoPropertySet>
+ </Connection>
+ <Options>
+ <DesignerInfoPropertySet>
+ <DesignerProperty Name="ValidateOnBuild" Value="true" />
+ <DesignerProperty Name="EnablePluralization" Value="true" />
+ <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
+ <DesignerProperty Name="UseLegacyProvider" Value="false" />
+ <DesignerProperty Name="CodeGenerationStrategy" Value="None" />
+ </DesignerInfoPropertySet>
+ </Options>
+ <!-- Diagram content (shape and connector positions) -->
+ <Diagrams></Diagrams>
+ </Designer>
+</edmx:Edmx> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram
new file mode 100644
index 000000000..d0490a23a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
+ <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+ <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
+ <!-- Diagram content (shape and connector positions) -->
+ <edmx:Diagrams>
+ <Diagram DiagramId="67415a77da9a47f2810e9bfd67b9921a" Name="Diagram1">
+ <EntityTypeShape EntityType="LocalModel.ACTION" Width="1.5" PointX="0.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.ADDRESS" Width="1.5" PointX="2.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="2.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="4.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.APPLICATION_VERSION" Width="1.5" PointX="4.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.CONFIGURATION" Width="1.5" PointX="6.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.CONFIGURATIONS_DISPENSERS" Width="1.5" PointX="0.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.CONTACT" Width="1.5" PointX="2.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.DISPENSER" Width="1.5" PointX="6.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="4.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.EVENT" Width="1.5" PointX="8.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.EVENTS_ACTIONS" Width="1.5" PointX="8.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.FIBER_SHAPES" Width="1.5" PointX="8.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.FIBER_SYNTHESIS" Width="1.5" PointX="0.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.HARDWARE_VERSIONS" Width="1.5" PointX="2.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="4.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.LIQUID_TYPES" Width="1.5" PointX="6.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.LIQUID" Width="1.5" PointX="8.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.LIQUIDS_RML" Width="1.5" PointX="10.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.MACHINE_VERSIONS" Width="1.5" PointX="10.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.MACHINE" Width="1.5" PointX="10.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.MACHINES_EVENTS" Width="1.5" PointX="10.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.MEDIA_COLORS" Width="1.5" PointX="12.75" PointY="0.75" />
+ <EntityTypeShape EntityType="LocalModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.MEDIA_MATERIALS" Width="1.5" PointX="2.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.MEDIA_PURPOSES" Width="1.5" PointX="12.75" PointY="3.75" />
+ <EntityTypeShape EntityType="LocalModel.ORGANIZATION" Width="1.5" PointX="4.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.PERMISSION" Width="1.5" PointX="12.75" PointY="6.75" />
+ <EntityTypeShape EntityType="LocalModel.RML" Width="1.5" PointX="6.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.ROLE" Width="1.5" PointX="8.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.ROLES_PERMISSIONS" Width="1.5" PointX="12.75" PointY="9.75" />
+ <EntityTypeShape EntityType="LocalModel.USER" Width="1.5" PointX="10.75" PointY="12.75" />
+ <EntityTypeShape EntityType="LocalModel.USERS_ROLES" Width="1.5" PointX="12.75" PointY="12.75" />
+ </Diagram>
+ </edmx:Diagrams>
+ </edmx:Designer>
+</edmx:Edmx> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.tt b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.tt
new file mode 100644
index 000000000..4acc3fed3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.tt
@@ -0,0 +1,733 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"LocalADO.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var fileManager = EntityFrameworkTemplateFileManager.Create(this);
+var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
+{
+ return string.Empty;
+}
+
+WriteHeader(codeStringGenerator, fileManager);
+
+foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
+{
+ fileManager.StartNewFile(entity.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
+<#=codeStringGenerator.EntityClassOpening(entity)#>
+{
+<#
+ var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
+ var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
+ var complexProperties = typeMapper.GetComplexProperties(entity);
+
+ if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
+ {
+#>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+ public <#=code.Escape(entity)#>()
+ {
+<#
+ foreach (var edmProperty in propertiesWithDefaultValues)
+ {
+#>
+ this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+ }
+
+ foreach (var navigationProperty in collectionNavigationProperties)
+ {
+#>
+ this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
+<#
+ }
+
+ foreach (var complexProperty in complexProperties)
+ {
+#>
+ this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+ }
+#>
+ }
+
+<#
+ }
+
+ var simpleProperties = typeMapper.GetSimpleProperties(entity);
+ if (simpleProperties.Any())
+ {
+ foreach (var edmProperty in simpleProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+
+ if (complexProperties.Any())
+ {
+#>
+
+<#
+ foreach(var complexProperty in complexProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(complexProperty)#>
+<#
+ }
+ }
+
+ var navigationProperties = typeMapper.GetNavigationProperties(entity);
+ if (navigationProperties.Any())
+ {
+#>
+
+<#
+ foreach (var navigationProperty in navigationProperties)
+ {
+ if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
+ {
+#>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+<#
+ }
+#>
+ <#=codeStringGenerator.NavigationProperty(navigationProperty)#>
+<#
+ }
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
+{
+ fileManager.StartNewFile(complex.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
+{
+<#
+ var complexProperties = typeMapper.GetComplexProperties(complex);
+ var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
+
+ if (propertiesWithDefaultValues.Any() || complexProperties.Any())
+ {
+#>
+ public <#=code.Escape(complex)#>()
+ {
+<#
+ foreach (var edmProperty in propertiesWithDefaultValues)
+ {
+#>
+ this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+ }
+
+ foreach (var complexProperty in complexProperties)
+ {
+#>
+ this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+ }
+#>
+ }
+
+<#
+ }
+
+ var simpleProperties = typeMapper.GetSimpleProperties(complex);
+ if (simpleProperties.Any())
+ {
+ foreach(var edmProperty in simpleProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+
+ if (complexProperties.Any())
+ {
+#>
+
+<#
+ foreach(var edmProperty in complexProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
+{
+ fileManager.StartNewFile(enumType.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#
+ if (typeMapper.EnumIsFlags(enumType))
+ {
+#>
+[Flags]
+<#
+ }
+#>
+<#=codeStringGenerator.EnumOpening(enumType)#>
+{
+<#
+ var foundOne = false;
+
+ foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
+ {
+ foundOne = true;
+#>
+ <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
+<#
+ }
+
+ if (foundOne)
+ {
+ this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+fileManager.Process();
+
+#>
+<#+
+
+public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
+{
+ fileManager.StartHeader();
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
+<#+
+ fileManager.EndBlock();
+}
+
+public void BeginNamespace(CodeGenerationTools code)
+{
+ var codeNamespace = code.VsNamespaceSuggestion();
+ if (!String.IsNullOrEmpty(codeNamespace))
+ {
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#+
+ PushIndent(" ");
+ }
+}
+
+public void EndNamespace(CodeGenerationTools code)
+{
+ if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
+ {
+ PopIndent();
+#>
+}
+<#+
+ }
+}
+
+public const string TemplateId = "CSharp_DbContext_Types_EF6";
+
+public class CodeStringGenerator
+{
+ private readonly CodeGenerationTools _code;
+ private readonly TypeMapper _typeMapper;
+ private readonly MetadataTools _ef;
+
+ public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(typeMapper, "typeMapper");
+ ArgumentNotNull(ef, "ef");
+
+ _code = code;
+ _typeMapper = typeMapper;
+ _ef = ef;
+ }
+
+ public string Property(EdmProperty edmProperty)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ Accessibility.ForProperty(edmProperty),
+ _typeMapper.GetTypeName(edmProperty.TypeUsage),
+ _code.Escape(edmProperty),
+ _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+ _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+ }
+
+ public string NavigationProperty(NavigationProperty navProp)
+ {
+ var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+ navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+ _code.Escape(navProp),
+ _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+ _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+ }
+
+ public string AccessibilityAndVirtual(string accessibility)
+ {
+ return accessibility + (accessibility != "private" ? " virtual" : "");
+ }
+
+ public string EntityClassOpening(EntityType entity)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1}partial class {2}{3}",
+ Accessibility.ForType(entity),
+ _code.SpaceAfter(_code.AbstractOption(entity)),
+ _code.Escape(entity),
+ _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+ }
+
+ public string EnumOpening(SimpleType enumType)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} enum {1} : {2}",
+ Accessibility.ForType(enumType),
+ _code.Escape(enumType),
+ _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+ }
+
+ public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+ {
+ var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+ {
+ var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+ var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+ var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+ writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+ }
+ }
+
+ public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} IQueryable<{1}> {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ _code.Escape(edmFunction),
+ string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+ }
+
+ public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ edmFunction.NamespaceName,
+ edmFunction.Name,
+ string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+ _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+ }
+
+ public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+ if (includeMergeOption)
+ {
+ paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ _code.Escape(edmFunction),
+ paramList);
+ }
+
+ public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+ if (includeMergeOption)
+ {
+ callParams = ", mergeOption" + callParams;
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+ returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ edmFunction.Name,
+ callParams);
+ }
+
+ public string DbSet(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+ Accessibility.ForReadOnlyProperty(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType),
+ _code.Escape(entitySet));
+ }
+
+ public string UsingDirectives(bool inHeader, bool includeCollections = true)
+ {
+ return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+ ? string.Format(
+ CultureInfo.InvariantCulture,
+ "{0}using System;{1}" +
+ "{2}",
+ inHeader ? Environment.NewLine : "",
+ includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+ inHeader ? "" : Environment.NewLine)
+ : "";
+ }
+}
+
+public class TypeMapper
+{
+ private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+ private readonly System.Collections.IList _errors;
+ private readonly CodeGenerationTools _code;
+ private readonly MetadataTools _ef;
+
+ public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(ef, "ef");
+ ArgumentNotNull(errors, "errors");
+
+ _code = code;
+ _ef = ef;
+ _errors = errors;
+ }
+
+ public static string FixNamespaces(string typeName)
+ {
+ return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+ }
+
+ public string GetTypeName(TypeUsage typeUsage)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+ }
+
+ public string GetTypeName(EdmType edmType)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+ }
+
+ public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, string modelNamespace)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+ {
+ if (edmType == null)
+ {
+ return null;
+ }
+
+ var collectionType = edmType as CollectionType;
+ if (collectionType != null)
+ {
+ return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+ }
+
+ var typeName = _code.Escape(edmType.MetadataProperties
+ .Where(p => p.Name == ExternalTypeNameAttributeName)
+ .Select(p => (string)p.Value)
+ .FirstOrDefault())
+ ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+ _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+ _code.Escape(edmType));
+
+ if (edmType is StructuralType)
+ {
+ return typeName;
+ }
+
+ if (edmType is SimpleType)
+ {
+ var clrType = UnderlyingClrType(edmType);
+ if (!IsEnumType(edmType))
+ {
+ typeName = _code.Escape(clrType);
+ }
+
+ typeName = FixNamespaces(typeName);
+
+ return clrType.IsValueType && isNullable == true ?
+ String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+ typeName;
+ }
+
+ throw new ArgumentException("edmType");
+ }
+
+ public Type UnderlyingClrType(EdmType edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ var primitiveType = edmType as PrimitiveType;
+ if (primitiveType != null)
+ {
+ return primitiveType.ClrEquivalentType;
+ }
+
+ if (IsEnumType(edmType))
+ {
+ return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+ }
+
+ return typeof(object);
+ }
+
+ public object GetEnumMemberValue(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var valueProperty = enumMember.GetType().GetProperty("Value");
+ return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+ }
+
+ public string GetEnumMemberName(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var nameProperty = enumMember.GetType().GetProperty("Name");
+ return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+ }
+
+ public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var membersProperty = enumType.GetType().GetProperty("Members");
+ return membersProperty != null
+ ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+ : Enumerable.Empty<MetadataItem>();
+ }
+
+ public bool EnumIsFlags(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+ return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+ }
+
+ public bool IsEnumType(GlobalItem edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ return edmType.GetType().Name == "EnumType";
+ }
+
+ public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+ }
+
+ public string CreateLiteral(object value)
+ {
+ if (value == null || value.GetType() != typeof(TimeSpan))
+ {
+ return _code.CreateLiteral(value);
+ }
+
+ return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+ }
+
+ public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+ {
+ ArgumentNotNull(types, "types");
+ ArgumentNotNull(sourceFile, "sourceFile");
+
+ var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+ if (types.Any(item => !hash.Add(item)))
+ {
+ _errors.Add(
+ new CompilerError(sourceFile, -1, -1, "6023",
+ String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+ return false;
+ }
+ return true;
+ }
+
+ public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+ {
+ return GetItemsToGenerate<SimpleType>(itemCollection)
+ .Where(e => IsEnumType(e));
+ }
+
+ public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+ {
+ return itemCollection
+ .OfType<T>()
+ .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+ .OrderBy(i => i.Name);
+ }
+
+ public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+ {
+ return itemCollection
+ .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+ .Select(g => GetGlobalItemName(g));
+ }
+
+ public string GetGlobalItemName(GlobalItem item)
+ {
+ if (item is EdmType)
+ {
+ return ((EdmType)item).Name;
+ }
+ else
+ {
+ return ((EntityContainer)item).Name;
+ }
+ }
+
+ public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type);
+ }
+
+ public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+ }
+
+ public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+ return returnParamsProperty == null
+ ? edmFunction.ReturnParameter
+ : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+ }
+
+ public bool IsComposable(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+ return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+ }
+
+ public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+ {
+ return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ }
+
+ public TypeUsage GetReturnType(EdmFunction edmFunction)
+ {
+ var returnParam = GetReturnParameter(edmFunction);
+ return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+ }
+
+ public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+ {
+ var returnType = GetReturnType(edmFunction);
+ return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+ }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+ if (arg == null)
+ {
+ throw new ArgumentNullException(name);
+ }
+}
+#> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs
new file mode 100644
index 000000000..cfffb4426
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MACHINE
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs
new file mode 100644
index 000000000..a3e6ca953
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MACHINES_EVENTS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs
new file mode 100644
index 000000000..e1a5d108c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MACHINE_VERSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs
new file mode 100644
index 000000000..c8ed1229f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MEDIA_COLORS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs
new file mode 100644
index 000000000..43a07a2a8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MEDIA_CONDITIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs
new file mode 100644
index 000000000..d2726980e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MEDIA_MATERIALS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs
new file mode 100644
index 000000000..f335c2949
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class MEDIA_PURPOSES
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs
new file mode 100644
index 000000000..b0e471487
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class ORGANIZATION
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs
new file mode 100644
index 000000000..368dcf103
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class PERMISSION
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs
new file mode 100644
index 000000000..44730636f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class RML
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs
new file mode 100644
index 000000000..19841df9e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class ROLE
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs
new file mode 100644
index 000000000..76ac2e872
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class ROLES_PERMISSIONS
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/USER.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/USER.cs
new file mode 100644
index 000000000..b705398f7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/USER.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class USER
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/USERS_ROLES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/USERS_ROLES.cs
new file mode 100644
index 000000000..b0d2aa5e5
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Local/DB/USERS_ROLES.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Local.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class USERS_ROLES
+ {
+ public long ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public bool DELETED { get; set; }
+ }
+}