Database designer
This commit is contained in:
parent
4c9048195f
commit
2c142fd7b4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -45,10 +45,18 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
|
@ -124,13 +132,51 @@
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Models\Appointments.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Credentials.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Doctors.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\FIT5032-Assignment.Context.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>FIT5032-Assignment.Context.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\FIT5032-Assignment.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\FIT5032-Assignment.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>FIT5032-Assignment.edmx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Images.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Patients.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Reviews.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Sessions.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\ShareURLs.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\Users.cs">
|
||||||
|
<DependentUpon>FIT5032-Assignment.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="App_Data\Database1.mdf" />
|
|
||||||
<Content Include="App_Data\Database1_log.ldf">
|
|
||||||
<DependentUpon>Database1.mdf</DependentUpon>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Content\bootstrap-grid.css" />
|
<Content Include="Content\bootstrap-grid.css" />
|
||||||
<Content Include="Content\bootstrap-grid.min.css" />
|
<Content Include="Content\bootstrap-grid.min.css" />
|
||||||
<Content Include="Content\bootstrap-grid.rtl.css" />
|
<Content Include="Content\bootstrap-grid.rtl.css" />
|
||||||
|
@ -150,12 +196,29 @@
|
||||||
<Content Include="favicon.ico" />
|
<Content Include="favicon.ico" />
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
<Content Include="Content\Site.css" />
|
<Content Include="Content\Site.css" />
|
||||||
|
<Content Include="Models\FIT5032-Assignment.Context.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>FIT5032-Assignment.Context.cs</LastGenOutput>
|
||||||
|
<DependentUpon>FIT5032-Assignment.edmx</DependentUpon>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Models\FIT5032-Assignment.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<DependentUpon>FIT5032-Assignment.edmx</DependentUpon>
|
||||||
|
<LastGenOutput>FIT5032-Assignment.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
<Content Include="Scripts\bootstrap.bundle.js" />
|
<Content Include="Scripts\bootstrap.bundle.js" />
|
||||||
<Content Include="Scripts\bootstrap.bundle.min.js" />
|
<Content Include="Scripts\bootstrap.bundle.min.js" />
|
||||||
<Content Include="Scripts\bootstrap.esm.js" />
|
<Content Include="Scripts\bootstrap.esm.js" />
|
||||||
<Content Include="Scripts\bootstrap.esm.min.js" />
|
<Content Include="Scripts\bootstrap.esm.min.js" />
|
||||||
<Content Include="Scripts\bootstrap.js" />
|
<Content Include="Scripts\bootstrap.js" />
|
||||||
<Content Include="Scripts\bootstrap.min.js" />
|
<Content Include="Scripts\bootstrap.min.js" />
|
||||||
|
<EntityDeploy Include="Models\FIT5032-Assignment.edmx">
|
||||||
|
<Generator>EntityModelCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>FIT5032-Assignment.Designer.cs</LastGenOutput>
|
||||||
|
</EntityDeploy>
|
||||||
|
<Content Include="Models\FIT5032-Assignment.edmx.diagram">
|
||||||
|
<DependentUpon>FIT5032-Assignment.edmx</DependentUpon>
|
||||||
|
</Content>
|
||||||
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
|
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
|
||||||
<Content Include="Scripts\jquery-3.4.1.js" />
|
<Content Include="Scripts\jquery-3.4.1.js" />
|
||||||
<Content Include="Scripts\jquery-3.4.1.min.js" />
|
<Content Include="Scripts\jquery-3.4.1.min.js" />
|
||||||
|
@ -183,7 +246,7 @@
|
||||||
<Content Include="Views\Home\Index.cshtml" />
|
<Content Include="Views\Home\Index.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\" />
|
<Folder Include="App_Data\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Content\bootstrap.rtl.min.css.map" />
|
<Content Include="Content\bootstrap.rtl.min.css.map" />
|
||||||
|
@ -212,6 +275,9 @@
|
||||||
<Content Include="Scripts\jquery-3.4.1.slim.min.map" />
|
<Content Include="Scripts\jquery-3.4.1.slim.min.map" />
|
||||||
<Content Include="Scripts\jquery-3.4.1.min.map" />
|
<Content Include="Scripts\jquery-3.4.1.min.map" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
|
37
FIT5032-Assignment/Models/Appointments.cs
Normal file
37
FIT5032-Assignment/Models/Appointments.cs
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Appointments
|
||||||
|
{
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||||
|
public Appointments()
|
||||||
|
{
|
||||||
|
this.Images = new HashSet<Images>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string uuid { get; set; }
|
||||||
|
public string patient { get; set; }
|
||||||
|
public Nullable<System.DateTime> createdAt { get; set; }
|
||||||
|
public string responsibleBy { get; set; }
|
||||||
|
public Nullable<System.DateTime> appointmentDate { get; set; }
|
||||||
|
public Nullable<int> status { get; set; }
|
||||||
|
public Nullable<int> createdBy { get; set; }
|
||||||
|
|
||||||
|
public virtual Patients Patients { get; set; }
|
||||||
|
public virtual Doctors Doctors { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Images> Images { get; set; }
|
||||||
|
public virtual Reviews Reviews { get; set; }
|
||||||
|
}
|
||||||
|
}
|
24
FIT5032-Assignment/Models/Credentials.cs
Normal file
24
FIT5032-Assignment/Models/Credentials.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Credentials
|
||||||
|
{
|
||||||
|
public string uuid { get; set; }
|
||||||
|
public string user { get; set; }
|
||||||
|
public int provider { get; set; }
|
||||||
|
public string uniqueIdCode { get; set; }
|
||||||
|
|
||||||
|
public virtual Users Users { get; set; }
|
||||||
|
}
|
||||||
|
}
|
36
FIT5032-Assignment/Models/Doctors.cs
Normal file
36
FIT5032-Assignment/Models/Doctors.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Doctors
|
||||||
|
{
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||||
|
public Doctors()
|
||||||
|
{
|
||||||
|
this.Appointments = new HashSet<Appointments>();
|
||||||
|
this.Images = new HashSet<Images>();
|
||||||
|
this.Reviews = new HashSet<Reviews>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string user { get; set; }
|
||||||
|
public string bio { get; set; }
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Appointments> Appointments { get; set; }
|
||||||
|
public virtual Users Users { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Images> Images { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Reviews> Reviews { get; set; }
|
||||||
|
}
|
||||||
|
}
|
38
FIT5032-Assignment/Models/FIT5032-Assignment.Context.cs
Normal file
38
FIT5032-Assignment/Models/FIT5032-Assignment.Context.cs
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Data.Entity.Infrastructure;
|
||||||
|
|
||||||
|
public partial class Database1Entities : DbContext
|
||||||
|
{
|
||||||
|
public Database1Entities()
|
||||||
|
: base("name=Database1Entities")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
throw new UnintentionalCodeFirstException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual DbSet<Appointments> Appointments { get; set; }
|
||||||
|
public virtual DbSet<Credentials> Credentials { get; set; }
|
||||||
|
public virtual DbSet<Doctors> Doctors { get; set; }
|
||||||
|
public virtual DbSet<Images> Images { get; set; }
|
||||||
|
public virtual DbSet<Patients> Patients { get; set; }
|
||||||
|
public virtual DbSet<Reviews> Reviews { get; set; }
|
||||||
|
public virtual DbSet<Sessions> Sessions { get; set; }
|
||||||
|
public virtual DbSet<ShareURLs> ShareURLs { get; set; }
|
||||||
|
public virtual DbSet<Users> Users { get; set; }
|
||||||
|
}
|
||||||
|
}
|
636
FIT5032-Assignment/Models/FIT5032-Assignment.Context.tt
Normal file
636
FIT5032-Assignment/Models/FIT5032-Assignment.Context.tt
Normal file
|
@ -0,0 +1,636 @@
|
||||||
|
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||||
|
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||||
|
output extension=".cs"#><#
|
||||||
|
|
||||||
|
const string inputFile = @"FIT5032-Assignment.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#>
|
10
FIT5032-Assignment/Models/FIT5032-Assignment.Designer.cs
generated
Normal file
10
FIT5032-Assignment/Models/FIT5032-Assignment.Designer.cs
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
// T4 code generation is enabled for model 'C:\Users\astri\source\repos\FIT5032-Assignment\FIT5032-Assignment\Models\FIT5032-Assignment.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...'.
|
9
FIT5032-Assignment/Models/FIT5032-Assignment.cs
Normal file
9
FIT5032-Assignment/Models/FIT5032-Assignment.cs
Normal file
|
@ -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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
788
FIT5032-Assignment/Models/FIT5032-Assignment.edmx
Normal file
788
FIT5032-Assignment/Models/FIT5032-Assignment.edmx
Normal file
|
@ -0,0 +1,788 @@
|
||||||
|
<?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="FIT5032Assignment.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" 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="Appointments">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="createdAt" Type="datetime" />
|
||||||
|
<Property Name="responsibleBy" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="appointmentDate" Type="datetime" />
|
||||||
|
<Property Name="status" Type="int" />
|
||||||
|
<Property Name="createdBy" Type="int" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Credentials">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="user" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="provider" Type="int" Nullable="false" />
|
||||||
|
<Property Name="uniqueIdCode" Type="varchar(max)" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Doctors">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="user" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="bio" Type="varchar(max)" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Images">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="responsibleBy" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="createdAt" Type="datetime" />
|
||||||
|
<Property Name="appointment" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="status" Type="int" />
|
||||||
|
<Property Name="file" Type="varchar(max)" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Patients">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="user" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="phone" Type="varchar(max)" />
|
||||||
|
<Property Name="address" Type="varchar(max)" />
|
||||||
|
<Property Name="notes" Type="varchar(max)" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Reviews">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="appointment" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="doctor" Type="varchar" MaxLength="36" />
|
||||||
|
<Property Name="score" Type="int" />
|
||||||
|
<Property Name="comment" Type="varchar(max)" />
|
||||||
|
<Property Name="reply" Type="varchar(max)" />
|
||||||
|
<Property Name="reviewAt" Type="datetime" />
|
||||||
|
<Property Name="replyAt" Type="datetime" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Sessions">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="user" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="token" Type="varchar(max)" />
|
||||||
|
<Property Name="alias" Type="varchar(max)" />
|
||||||
|
<Property Name="validFrom" Type="datetime" />
|
||||||
|
<Property Name="validTo" Type="datetime" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="ShareURLs">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="image" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="image" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="visibility" Type="int" />
|
||||||
|
<Property Name="slug" Type="varchar(max)" />
|
||||||
|
<Property Name="status" Type="int" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Users">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="varchar" MaxLength="36" Nullable="false" />
|
||||||
|
<Property Name="displayName" Type="varchar(max)" />
|
||||||
|
<Property Name="avatar" Type="varchar(max)" />
|
||||||
|
<Property Name="role" Type="int" />
|
||||||
|
</EntityType>
|
||||||
|
<Association Name="FK__Appointme__patie__5AEE82B9">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Appointments">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Appointme__respo__5BE2A6F2">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Appointments">
|
||||||
|
<PropertyRef Name="responsibleBy" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Credential__user__4BAC3F29">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Credentials" Type="Self.Credentials" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Credentials">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Doctors__user__5441852A">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__appointm__60A75C0F">
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Appointments">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__patient__5EBF139D">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__responsi__5FB337D6">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="responsibleBy" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Patients__user__5165187F">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__appoint__6383C8BA">
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Appointments">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__doctor__656C112C">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="doctor" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__patient__6477ECF3">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Sessions__user__4E88ABD4">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Sessions" Type="Self.Sessions" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Sessions">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__ShareURLs__image__68487DD7">
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="1" />
|
||||||
|
<End Role="ShareURLs" Type="Self.ShareURLs" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Images">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="ShareURLs">
|
||||||
|
<PropertyRef Name="image" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<EntityContainer Name="FIT5032AssignmentStoreContainer">
|
||||||
|
<EntitySet Name="Appointments" EntityType="Self.Appointments" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Credentials" EntityType="Self.Credentials" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Doctors" EntityType="Self.Doctors" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Images" EntityType="Self.Images" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Patients" EntityType="Self.Patients" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Reviews" EntityType="Self.Reviews" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Sessions" EntityType="Self.Sessions" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="ShareURLs" EntityType="Self.ShareURLs" Schema="dbo" store:Type="Tables" />
|
||||||
|
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
||||||
|
<AssociationSet Name="FK__Appointme__patie__5AEE82B9" Association="Self.FK__Appointme__patie__5AEE82B9">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Appointme__respo__5BE2A6F2" Association="Self.FK__Appointme__respo__5BE2A6F2">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Credential__user__4BAC3F29" Association="Self.FK__Credential__user__4BAC3F29">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Credentials" EntitySet="Credentials" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Doctors__user__5441852A" Association="Self.FK__Doctors__user__5441852A">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__appointm__60A75C0F" Association="Self.FK__Images__appointm__60A75C0F">
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__patient__5EBF139D" Association="Self.FK__Images__patient__5EBF139D">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__responsi__5FB337D6" Association="Self.FK__Images__responsi__5FB337D6">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Patients__user__5165187F" Association="Self.FK__Patients__user__5165187F">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__appoint__6383C8BA" Association="Self.FK__Reviews__appoint__6383C8BA">
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__doctor__656C112C" Association="Self.FK__Reviews__doctor__656C112C">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__patient__6477ECF3" Association="Self.FK__Reviews__patient__6477ECF3">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Sessions__user__4E88ABD4" Association="Self.FK__Sessions__user__4E88ABD4">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Sessions" EntitySet="Sessions" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__ShareURLs__image__68487DD7" Association="Self.FK__ShareURLs__image__68487DD7">
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
<End Role="ShareURLs" EntitySet="ShareURLs" />
|
||||||
|
</AssociationSet>
|
||||||
|
</EntityContainer>
|
||||||
|
</Schema>
|
||||||
|
</edmx:StorageModels>
|
||||||
|
<!-- CSDL content -->
|
||||||
|
<edmx:ConceptualModels>
|
||||||
|
<Schema Namespace="FIT5032Assignment" 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">
|
||||||
|
<EntityType Name="Appointments">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="createdAt" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="responsibleBy" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="appointmentDate" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="status" Type="Int32" />
|
||||||
|
<Property Name="createdBy" Type="Int32" />
|
||||||
|
<NavigationProperty Name="Patients" Relationship="Self.FK__Appointme__patie__5AEE82B9" FromRole="Appointments" ToRole="Patients" />
|
||||||
|
<NavigationProperty Name="Doctors" Relationship="Self.FK__Appointme__respo__5BE2A6F2" FromRole="Appointments" ToRole="Doctors" />
|
||||||
|
<NavigationProperty Name="Images" Relationship="Self.FK__Images__appointm__60A75C0F" FromRole="Appointments" ToRole="Images" />
|
||||||
|
<NavigationProperty Name="Reviews" Relationship="Self.FK__Reviews__appoint__6383C8BA" FromRole="Appointments" ToRole="Reviews" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Credentials">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="user" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="provider" Type="Int32" Nullable="false" />
|
||||||
|
<Property Name="uniqueIdCode" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<NavigationProperty Name="Users" Relationship="Self.FK__Credential__user__4BAC3F29" FromRole="Credentials" ToRole="Users" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Doctors">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="user" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="bio" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<NavigationProperty Name="Appointments" Relationship="Self.FK__Appointme__respo__5BE2A6F2" FromRole="Doctors" ToRole="Appointments" />
|
||||||
|
<NavigationProperty Name="Users" Relationship="Self.FK__Doctors__user__5441852A" FromRole="Doctors" ToRole="Users" />
|
||||||
|
<NavigationProperty Name="Images" Relationship="Self.FK__Images__responsi__5FB337D6" FromRole="Doctors" ToRole="Images" />
|
||||||
|
<NavigationProperty Name="Reviews" Relationship="Self.FK__Reviews__doctor__656C112C" FromRole="Doctors" ToRole="Reviews" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Images">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="responsibleBy" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="createdAt" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="appointment" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="status" Type="Int32" />
|
||||||
|
<Property Name="file" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<NavigationProperty Name="Appointments" Relationship="Self.FK__Images__appointm__60A75C0F" FromRole="Images" ToRole="Appointments" />
|
||||||
|
<NavigationProperty Name="Doctors" Relationship="Self.FK__Images__responsi__5FB337D6" FromRole="Images" ToRole="Doctors" />
|
||||||
|
<NavigationProperty Name="Patients" Relationship="Self.FK__Images__patient__5EBF139D" FromRole="Images" ToRole="Patients" />
|
||||||
|
<NavigationProperty Name="ShareURLs" Relationship="Self.FK__ShareURLs__image__68487DD7" FromRole="Images" ToRole="ShareURLs" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Patients">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="user" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="phone" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="address" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="notes" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<NavigationProperty Name="Appointments" Relationship="Self.FK__Appointme__patie__5AEE82B9" FromRole="Patients" ToRole="Appointments" />
|
||||||
|
<NavigationProperty Name="Images" Relationship="Self.FK__Images__patient__5EBF139D" FromRole="Patients" ToRole="Images" />
|
||||||
|
<NavigationProperty Name="Users" Relationship="Self.FK__Patients__user__5165187F" FromRole="Patients" ToRole="Users" />
|
||||||
|
<NavigationProperty Name="Reviews" Relationship="Self.FK__Reviews__patient__6477ECF3" FromRole="Patients" ToRole="Reviews" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Reviews">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="appointment" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="patient" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="doctor" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="score" Type="Int32" />
|
||||||
|
<Property Name="comment" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="reply" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="reviewAt" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="replyAt" Type="DateTime" Precision="3" />
|
||||||
|
<NavigationProperty Name="Appointments" Relationship="Self.FK__Reviews__appoint__6383C8BA" FromRole="Reviews" ToRole="Appointments" />
|
||||||
|
<NavigationProperty Name="Doctors" Relationship="Self.FK__Reviews__doctor__656C112C" FromRole="Reviews" ToRole="Doctors" />
|
||||||
|
<NavigationProperty Name="Patients" Relationship="Self.FK__Reviews__patient__6477ECF3" FromRole="Reviews" ToRole="Patients" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Sessions">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="user" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="token" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="alias" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="validFrom" Type="DateTime" Precision="3" />
|
||||||
|
<Property Name="validTo" Type="DateTime" Precision="3" />
|
||||||
|
<NavigationProperty Name="Users" Relationship="Self.FK__Sessions__user__4E88ABD4" FromRole="Sessions" ToRole="Users" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="ShareURLs">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="image" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="image" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="visibility" Type="Int32" />
|
||||||
|
<Property Name="slug" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="status" Type="Int32" />
|
||||||
|
<NavigationProperty Name="Images" Relationship="Self.FK__ShareURLs__image__68487DD7" FromRole="ShareURLs" ToRole="Images" />
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Users">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Key>
|
||||||
|
<Property Name="uuid" Type="String" MaxLength="36" FixedLength="false" Unicode="false" Nullable="false" />
|
||||||
|
<Property Name="displayName" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="avatar" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
||||||
|
<Property Name="role" Type="Int32" />
|
||||||
|
<NavigationProperty Name="Credentials" Relationship="Self.FK__Credential__user__4BAC3F29" FromRole="Users" ToRole="Credentials" />
|
||||||
|
<NavigationProperty Name="Doctors" Relationship="Self.FK__Doctors__user__5441852A" FromRole="Users" ToRole="Doctors" />
|
||||||
|
<NavigationProperty Name="Patients" Relationship="Self.FK__Patients__user__5165187F" FromRole="Users" ToRole="Patients" />
|
||||||
|
<NavigationProperty Name="Sessions" Relationship="Self.FK__Sessions__user__4E88ABD4" FromRole="Users" ToRole="Sessions" />
|
||||||
|
</EntityType>
|
||||||
|
<Association Name="FK__Appointme__patie__5AEE82B9">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Appointments">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Appointme__respo__5BE2A6F2">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Appointments">
|
||||||
|
<PropertyRef Name="responsibleBy" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__appointm__60A75C0F">
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Appointments">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__appoint__6383C8BA">
|
||||||
|
<End Role="Appointments" Type="Self.Appointments" Multiplicity="1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Appointments">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="appointment" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Credential__user__4BAC3F29">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Credentials" Type="Self.Credentials" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Credentials">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Doctors__user__5441852A">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__responsi__5FB337D6">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="responsibleBy" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__doctor__656C112C">
|
||||||
|
<End Role="Doctors" Type="Self.Doctors" Multiplicity="0..1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Doctors">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="doctor" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Images__patient__5EBF139D">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Images">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__ShareURLs__image__68487DD7">
|
||||||
|
<End Role="Images" Type="Self.Images" Multiplicity="1" />
|
||||||
|
<End Role="ShareURLs" Type="Self.ShareURLs" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Images">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="ShareURLs">
|
||||||
|
<PropertyRef Name="image" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Patients__user__5165187F">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Reviews__patient__6477ECF3">
|
||||||
|
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||||
|
<End Role="Reviews" Type="Self.Reviews" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Patients">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Reviews">
|
||||||
|
<PropertyRef Name="patient" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<Association Name="FK__Sessions__user__4E88ABD4">
|
||||||
|
<End Role="Users" Type="Self.Users" Multiplicity="1" />
|
||||||
|
<End Role="Sessions" Type="Self.Sessions" Multiplicity="*" />
|
||||||
|
<ReferentialConstraint>
|
||||||
|
<Principal Role="Users">
|
||||||
|
<PropertyRef Name="uuid" />
|
||||||
|
</Principal>
|
||||||
|
<Dependent Role="Sessions">
|
||||||
|
<PropertyRef Name="user" />
|
||||||
|
</Dependent>
|
||||||
|
</ReferentialConstraint>
|
||||||
|
</Association>
|
||||||
|
<EntityContainer Name="Database1Entities" annotation:LazyLoadingEnabled="true">
|
||||||
|
<EntitySet Name="Appointments" EntityType="Self.Appointments" />
|
||||||
|
<EntitySet Name="Credentials" EntityType="Self.Credentials" />
|
||||||
|
<EntitySet Name="Doctors" EntityType="Self.Doctors" />
|
||||||
|
<EntitySet Name="Images" EntityType="Self.Images" />
|
||||||
|
<EntitySet Name="Patients" EntityType="Self.Patients" />
|
||||||
|
<EntitySet Name="Reviews" EntityType="Self.Reviews" />
|
||||||
|
<EntitySet Name="Sessions" EntityType="Self.Sessions" />
|
||||||
|
<EntitySet Name="ShareURLs" EntityType="Self.ShareURLs" />
|
||||||
|
<EntitySet Name="Users" EntityType="Self.Users" />
|
||||||
|
<AssociationSet Name="FK__Appointme__patie__5AEE82B9" Association="Self.FK__Appointme__patie__5AEE82B9">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Appointme__respo__5BE2A6F2" Association="Self.FK__Appointme__respo__5BE2A6F2">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__appointm__60A75C0F" Association="Self.FK__Images__appointm__60A75C0F">
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__appoint__6383C8BA" Association="Self.FK__Reviews__appoint__6383C8BA">
|
||||||
|
<End Role="Appointments" EntitySet="Appointments" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Credential__user__4BAC3F29" Association="Self.FK__Credential__user__4BAC3F29">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Credentials" EntitySet="Credentials" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Doctors__user__5441852A" Association="Self.FK__Doctors__user__5441852A">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__responsi__5FB337D6" Association="Self.FK__Images__responsi__5FB337D6">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__doctor__656C112C" Association="Self.FK__Reviews__doctor__656C112C">
|
||||||
|
<End Role="Doctors" EntitySet="Doctors" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Images__patient__5EBF139D" Association="Self.FK__Images__patient__5EBF139D">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__ShareURLs__image__68487DD7" Association="Self.FK__ShareURLs__image__68487DD7">
|
||||||
|
<End Role="Images" EntitySet="Images" />
|
||||||
|
<End Role="ShareURLs" EntitySet="ShareURLs" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Patients__user__5165187F" Association="Self.FK__Patients__user__5165187F">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Reviews__patient__6477ECF3" Association="Self.FK__Reviews__patient__6477ECF3">
|
||||||
|
<End Role="Patients" EntitySet="Patients" />
|
||||||
|
<End Role="Reviews" EntitySet="Reviews" />
|
||||||
|
</AssociationSet>
|
||||||
|
<AssociationSet Name="FK__Sessions__user__4E88ABD4" Association="Self.FK__Sessions__user__4E88ABD4">
|
||||||
|
<End Role="Users" EntitySet="Users" />
|
||||||
|
<End Role="Sessions" EntitySet="Sessions" />
|
||||||
|
</AssociationSet>
|
||||||
|
</EntityContainer>
|
||||||
|
</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="FIT5032AssignmentStoreContainer" CdmEntityContainer="Database1Entities">
|
||||||
|
<EntitySetMapping Name="Appointments">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Appointments">
|
||||||
|
<MappingFragment StoreEntitySet="Appointments">
|
||||||
|
<ScalarProperty Name="uuid" ColumnName="uuid" />
|
||||||
|
<ScalarProperty Name="patient" ColumnName="patient" />
|
||||||
|
<ScalarProperty Name="createdAt" ColumnName="createdAt" />
|
||||||
|
<ScalarProperty Name="responsibleBy" ColumnName="responsibleBy" />
|
||||||
|
<ScalarProperty Name="appointmentDate" ColumnName="appointmentDate" />
|
||||||
|
<ScalarProperty Name="status" ColumnName="status" />
|
||||||
|
<ScalarProperty Name="createdBy" ColumnName="createdBy" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Credentials">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Credentials">
|
||||||
|
<MappingFragment StoreEntitySet="Credentials">
|
||||||
|
<ScalarProperty Name="uuid" ColumnName="uuid" />
|
||||||
|
<ScalarProperty Name="user" ColumnName="user" />
|
||||||
|
<ScalarProperty Name="provider" ColumnName="provider" />
|
||||||
|
<ScalarProperty Name="uniqueIdCode" ColumnName="uniqueIdCode" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Doctors">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Doctors">
|
||||||
|
<MappingFragment StoreEntitySet="Doctors">
|
||||||
|
<ScalarProperty Name="user" ColumnName="user" />
|
||||||
|
<ScalarProperty Name="bio" ColumnName="bio" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Images">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Images">
|
||||||
|
<MappingFragment StoreEntitySet="Images">
|
||||||
|
<ScalarProperty Name="uuid" ColumnName="uuid" />
|
||||||
|
<ScalarProperty Name="patient" ColumnName="patient" />
|
||||||
|
<ScalarProperty Name="responsibleBy" ColumnName="responsibleBy" />
|
||||||
|
<ScalarProperty Name="createdAt" ColumnName="createdAt" />
|
||||||
|
<ScalarProperty Name="appointment" ColumnName="appointment" />
|
||||||
|
<ScalarProperty Name="status" ColumnName="status" />
|
||||||
|
<ScalarProperty Name="file" ColumnName="file" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Patients">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Patients">
|
||||||
|
<MappingFragment StoreEntitySet="Patients">
|
||||||
|
<ScalarProperty Name="user" ColumnName="user" />
|
||||||
|
<ScalarProperty Name="phone" ColumnName="phone" />
|
||||||
|
<ScalarProperty Name="address" ColumnName="address" />
|
||||||
|
<ScalarProperty Name="notes" ColumnName="notes" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Reviews">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Reviews">
|
||||||
|
<MappingFragment StoreEntitySet="Reviews">
|
||||||
|
<ScalarProperty Name="appointment" ColumnName="appointment" />
|
||||||
|
<ScalarProperty Name="patient" ColumnName="patient" />
|
||||||
|
<ScalarProperty Name="doctor" ColumnName="doctor" />
|
||||||
|
<ScalarProperty Name="score" ColumnName="score" />
|
||||||
|
<ScalarProperty Name="comment" ColumnName="comment" />
|
||||||
|
<ScalarProperty Name="reply" ColumnName="reply" />
|
||||||
|
<ScalarProperty Name="reviewAt" ColumnName="reviewAt" />
|
||||||
|
<ScalarProperty Name="replyAt" ColumnName="replyAt" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Sessions">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Sessions">
|
||||||
|
<MappingFragment StoreEntitySet="Sessions">
|
||||||
|
<ScalarProperty Name="uuid" ColumnName="uuid" />
|
||||||
|
<ScalarProperty Name="user" ColumnName="user" />
|
||||||
|
<ScalarProperty Name="token" ColumnName="token" />
|
||||||
|
<ScalarProperty Name="alias" ColumnName="alias" />
|
||||||
|
<ScalarProperty Name="validFrom" ColumnName="validFrom" />
|
||||||
|
<ScalarProperty Name="validTo" ColumnName="validTo" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="ShareURLs">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.ShareURLs">
|
||||||
|
<MappingFragment StoreEntitySet="ShareURLs">
|
||||||
|
<ScalarProperty Name="image" ColumnName="image" />
|
||||||
|
<ScalarProperty Name="visibility" ColumnName="visibility" />
|
||||||
|
<ScalarProperty Name="slug" ColumnName="slug" />
|
||||||
|
<ScalarProperty Name="status" ColumnName="status" />
|
||||||
|
</MappingFragment>
|
||||||
|
</EntityTypeMapping>
|
||||||
|
</EntitySetMapping>
|
||||||
|
<EntitySetMapping Name="Users">
|
||||||
|
<EntityTypeMapping TypeName="FIT5032Assignment.Users">
|
||||||
|
<MappingFragment StoreEntitySet="Users">
|
||||||
|
<ScalarProperty Name="uuid" ColumnName="uuid" />
|
||||||
|
<ScalarProperty Name="displayName" ColumnName="displayName" />
|
||||||
|
<ScalarProperty Name="avatar" ColumnName="avatar" />
|
||||||
|
<ScalarProperty Name="role" ColumnName="role" />
|
||||||
|
</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="false" />
|
||||||
|
<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>
|
33
FIT5032-Assignment/Models/FIT5032-Assignment.edmx.diagram
Normal file
33
FIT5032-Assignment/Models/FIT5032-Assignment.edmx.diagram
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?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="25746f058647436b85f0424c3c052209" Name="Diagram1">
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Appointments" Width="1.5" PointX="5.25" PointY="7.75" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Credentials" Width="1.5" PointX="3" PointY="4" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Doctors" Width="1.5" PointX="3" PointY="6.625" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Images" Width="1.5" PointX="7.5" PointY="7.75" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Patients" Width="1.5" PointX="3" PointY="9.5" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Reviews" Width="1.5" PointX="10.5" PointY="7.75" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Sessions" Width="1.5" PointX="3" PointY="12.75" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.ShareURLs" Width="1.5" PointX="9.75" PointY="12.375" IsExpanded="true" />
|
||||||
|
<EntityTypeShape EntityType="FIT5032Assignment.Users" Width="1.5" PointX="0.75" PointY="8.25" IsExpanded="true" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Appointme__patie__5AEE82B9" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Appointme__respo__5BE2A6F2" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Images__appointm__60A75C0F" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Reviews__appoint__6383C8BA" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Credential__user__4BAC3F29" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Doctors__user__5441852A" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Images__responsi__5FB337D6" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Reviews__doctor__656C112C" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Images__patient__5EBF139D" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__ShareURLs__image__68487DD7" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Patients__user__5165187F" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Reviews__patient__6477ECF3" ManuallyRouted="false" />
|
||||||
|
<AssociationConnector Association="FIT5032Assignment.FK__Sessions__user__4E88ABD4" ManuallyRouted="false" />
|
||||||
|
</Diagram>
|
||||||
|
</edmx:Diagrams>
|
||||||
|
</edmx:Designer>
|
||||||
|
</edmx:Edmx>
|
733
FIT5032-Assignment/Models/FIT5032-Assignment.tt
Normal file
733
FIT5032-Assignment/Models/FIT5032-Assignment.tt
Normal file
|
@ -0,0 +1,733 @@
|
||||||
|
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||||
|
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||||
|
output extension=".cs"#><#
|
||||||
|
|
||||||
|
const string inputFile = @"FIT5032-Assignment.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#>
|
30
FIT5032-Assignment/Models/Images.cs
Normal file
30
FIT5032-Assignment/Models/Images.cs
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Images
|
||||||
|
{
|
||||||
|
public string uuid { get; set; }
|
||||||
|
public string patient { get; set; }
|
||||||
|
public string responsibleBy { get; set; }
|
||||||
|
public Nullable<System.DateTime> createdAt { get; set; }
|
||||||
|
public string appointment { get; set; }
|
||||||
|
public Nullable<int> status { get; set; }
|
||||||
|
public string file { get; set; }
|
||||||
|
|
||||||
|
public virtual Appointments Appointments { get; set; }
|
||||||
|
public virtual Doctors Doctors { get; set; }
|
||||||
|
public virtual Patients Patients { get; set; }
|
||||||
|
public virtual ShareURLs ShareURLs { get; set; }
|
||||||
|
}
|
||||||
|
}
|
38
FIT5032-Assignment/Models/Patients.cs
Normal file
38
FIT5032-Assignment/Models/Patients.cs
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Patients
|
||||||
|
{
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||||
|
public Patients()
|
||||||
|
{
|
||||||
|
this.Appointments = new HashSet<Appointments>();
|
||||||
|
this.Images = new HashSet<Images>();
|
||||||
|
this.Reviews = new HashSet<Reviews>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string user { get; set; }
|
||||||
|
public string phone { get; set; }
|
||||||
|
public string address { get; set; }
|
||||||
|
public string notes { get; set; }
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Appointments> Appointments { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Images> Images { get; set; }
|
||||||
|
public virtual Users Users { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Reviews> Reviews { get; set; }
|
||||||
|
}
|
||||||
|
}
|
30
FIT5032-Assignment/Models/Reviews.cs
Normal file
30
FIT5032-Assignment/Models/Reviews.cs
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Reviews
|
||||||
|
{
|
||||||
|
public string appointment { get; set; }
|
||||||
|
public string patient { get; set; }
|
||||||
|
public string doctor { get; set; }
|
||||||
|
public Nullable<int> score { get; set; }
|
||||||
|
public string comment { get; set; }
|
||||||
|
public string reply { get; set; }
|
||||||
|
public Nullable<System.DateTime> reviewAt { get; set; }
|
||||||
|
public Nullable<System.DateTime> replyAt { get; set; }
|
||||||
|
|
||||||
|
public virtual Appointments Appointments { get; set; }
|
||||||
|
public virtual Doctors Doctors { get; set; }
|
||||||
|
public virtual Patients Patients { get; set; }
|
||||||
|
}
|
||||||
|
}
|
26
FIT5032-Assignment/Models/Sessions.cs
Normal file
26
FIT5032-Assignment/Models/Sessions.cs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Sessions
|
||||||
|
{
|
||||||
|
public string uuid { get; set; }
|
||||||
|
public string user { get; set; }
|
||||||
|
public string token { get; set; }
|
||||||
|
public string alias { get; set; }
|
||||||
|
public Nullable<System.DateTime> validFrom { get; set; }
|
||||||
|
public Nullable<System.DateTime> validTo { get; set; }
|
||||||
|
|
||||||
|
public virtual Users Users { get; set; }
|
||||||
|
}
|
||||||
|
}
|
24
FIT5032-Assignment/Models/ShareURLs.cs
Normal file
24
FIT5032-Assignment/Models/ShareURLs.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class ShareURLs
|
||||||
|
{
|
||||||
|
public string image { get; set; }
|
||||||
|
public Nullable<int> visibility { get; set; }
|
||||||
|
public string slug { get; set; }
|
||||||
|
public Nullable<int> status { get; set; }
|
||||||
|
|
||||||
|
public virtual Images Images { get; set; }
|
||||||
|
}
|
||||||
|
}
|
36
FIT5032-Assignment/Models/Users.cs
Normal file
36
FIT5032-Assignment/Models/Users.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 FIT5032_Assignment.Models
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public partial class Users
|
||||||
|
{
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||||
|
public Users()
|
||||||
|
{
|
||||||
|
this.Credentials = new HashSet<Credentials>();
|
||||||
|
this.Sessions = new HashSet<Sessions>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string uuid { get; set; }
|
||||||
|
public string displayName { get; set; }
|
||||||
|
public string avatar { get; set; }
|
||||||
|
public Nullable<int> role { get; set; }
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Credentials> Credentials { get; set; }
|
||||||
|
public virtual Doctors Doctors { get; set; }
|
||||||
|
public virtual Patients Patients { get; set; }
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<Sessions> Sessions { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,10 @@
|
||||||
https://go.microsoft.com/fwlink/?LinkId=301880
|
https://go.microsoft.com/fwlink/?LinkId=301880
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
<add key="webpages:Enabled" value="false" />
|
<add key="webpages:Enabled" value="false" />
|
||||||
|
@ -34,7 +38,7 @@
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||||
|
@ -56,4 +60,17 @@
|
||||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||||
</compilers>
|
</compilers>
|
||||||
</system.codedom>
|
</system.codedom>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="Database1Entities" connectionString="metadata=res://*/Models.FIT5032-Assignment.csdl|res://*/Models.FIT5032-Assignment.ssdl|res://*/Models.FIT5032-Assignment.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\Database1.mdf;integrated security=True;connect timeout=30;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||||
|
</connectionStrings>
|
||||||
|
<entityFramework>
|
||||||
|
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||||
|
<parameters>
|
||||||
|
<parameter value="mssqllocaldb" />
|
||||||
|
</parameters>
|
||||||
|
</defaultConnectionFactory>
|
||||||
|
<providers>
|
||||||
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
|
</providers>
|
||||||
|
</entityFramework>
|
||||||
</configuration>
|
</configuration>
|
|
@ -2,6 +2,7 @@
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Antlr" version="3.5.0.2" targetFramework="net48" />
|
<package id="Antlr" version="3.5.0.2" targetFramework="net48" />
|
||||||
<package id="bootstrap" version="5.2.3" targetFramework="net48" />
|
<package id="bootstrap" version="5.2.3" targetFramework="net48" />
|
||||||
|
<package id="EntityFramework" version="6.2.0" targetFramework="net48" />
|
||||||
<package id="jQuery" version="3.4.1" targetFramework="net48" />
|
<package id="jQuery" version="3.4.1" targetFramework="net48" />
|
||||||
<package id="jQuery.Validation" version="1.17.0" targetFramework="net48" />
|
<package id="jQuery.Validation" version="1.17.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.9" targetFramework="net48" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.9" targetFramework="net48" />
|
||||||
|
|
5
packages/EntityFramework.6.2.0/Content/net40/App.config.transform
vendored
Normal file
5
packages/EntityFramework.6.2.0/Content/net40/App.config.transform
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
</configSections>
|
||||||
|
</configuration>
|
5
packages/EntityFramework.6.2.0/Content/net40/Web.config.transform
vendored
Normal file
5
packages/EntityFramework.6.2.0/Content/net40/Web.config.transform
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
</configSections>
|
||||||
|
</configuration>
|
BIN
packages/EntityFramework.6.2.0/EntityFramework.6.2.0.nupkg
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/EntityFramework.6.2.0.nupkg
vendored
Normal file
Binary file not shown.
BIN
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.SqlServer.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.SqlServer.dll
vendored
Normal file
Binary file not shown.
1959
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.SqlServer.xml
vendored
Normal file
1959
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.SqlServer.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.dll
vendored
Normal file
Binary file not shown.
45898
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.xml
vendored
Normal file
45898
packages/EntityFramework.6.2.0/lib/net40/EntityFramework.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.SqlServer.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.SqlServer.dll
vendored
Normal file
Binary file not shown.
2093
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.SqlServer.xml
vendored
Normal file
2093
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.SqlServer.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.dll
vendored
Normal file
Binary file not shown.
53236
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.xml
vendored
Normal file
53236
packages/EntityFramework.6.2.0/lib/net45/EntityFramework.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.PowerShell.Utility.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.PowerShell.Utility.dll
vendored
Normal file
Binary file not shown.
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.PowerShell.dll
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.PowerShell.dll
vendored
Normal file
Binary file not shown.
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.psd1
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/tools/EntityFramework.psd1
vendored
Normal file
Binary file not shown.
1176
packages/EntityFramework.6.2.0/tools/EntityFramework.psm1
vendored
Normal file
1176
packages/EntityFramework.6.2.0/tools/EntityFramework.psm1
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
packages/EntityFramework.6.2.0/tools/about_EntityFramework.help.txt
vendored
Normal file
48
packages/EntityFramework.6.2.0/tools/about_EntityFramework.help.txt
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
TOPIC
|
||||||
|
about_EntityFramework
|
||||||
|
|
||||||
|
SHORT DESCRIPTION
|
||||||
|
Provides information about Entity Framework commands.
|
||||||
|
|
||||||
|
LONG DESCRIPTION
|
||||||
|
This topic describes the Entity Framework commands. Entity Framework is
|
||||||
|
Microsoft's recommended data access technology for new applications.
|
||||||
|
|
||||||
|
The following Entity Framework cmdlets are used with Entity Framework
|
||||||
|
Migrations.
|
||||||
|
|
||||||
|
Cmdlet Description
|
||||||
|
----------------- ---------------------------------------------------
|
||||||
|
Enable-Migrations Enables Code First Migrations in a project.
|
||||||
|
|
||||||
|
Add-Migration Scaffolds a migration script for any pending model
|
||||||
|
changes.
|
||||||
|
|
||||||
|
Update-Database Applies any pending migrations to the database.
|
||||||
|
|
||||||
|
Get-Migrations Displays the migrations that have been applied to
|
||||||
|
the target database.
|
||||||
|
|
||||||
|
The following Entity Framework cmdlets are used by NuGet packages that
|
||||||
|
install Entity Framework providers. These commands are not usually used as
|
||||||
|
part of normal application development.
|
||||||
|
|
||||||
|
Cmdlet Description
|
||||||
|
------------------------------ ---------------------------------------
|
||||||
|
Add-EFProvider Adds or updates an Entity Framework
|
||||||
|
provider entry in the project config
|
||||||
|
file.
|
||||||
|
|
||||||
|
Add-EFDefaultConnectionFactory Adds or updates an Entity Framework
|
||||||
|
default connection factory in the
|
||||||
|
project config file.
|
||||||
|
|
||||||
|
Initialize-EFConfiguration Initializes the Entity Framework
|
||||||
|
section in the project config file and
|
||||||
|
sets defaults.
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
Enable-Migrations
|
||||||
|
Add-Migration
|
||||||
|
Update-Database
|
||||||
|
Get-Migrations
|
155
packages/EntityFramework.6.2.0/tools/init.ps1
vendored
Normal file
155
packages/EntityFramework.6.2.0/tools/init.ps1
vendored
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
param($installPath, $toolsPath, $package, $project)
|
||||||
|
|
||||||
|
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
|
||||||
|
{
|
||||||
|
Remove-Module EntityFramework
|
||||||
|
}
|
||||||
|
|
||||||
|
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
|
||||||
|
|
||||||
|
# SIG # Begin signature block
|
||||||
|
# MIIa3gYJKoZIhvcNAQcCoIIazzCCGssCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
|
||||||
|
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
|
||||||
|
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUjXj4E03IfImYfKMB4CA3DfY0
|
||||||
|
# KZmgghWAMIIEwjCCA6qgAwIBAgITMwAAAMDeLD0HlORJeQAAAAAAwDANBgkqhkiG
|
||||||
|
# 9w0BAQUFADB3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G
|
||||||
|
# A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEw
|
||||||
|
# HwYDVQQDExhNaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTYwOTA3MTc1ODUw
|
||||||
|
# WhcNMTgwOTA3MTc1ODUwWjCBsjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp
|
||||||
|
# bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
|
||||||
|
# b3JhdGlvbjEMMAoGA1UECxMDQU9DMScwJQYDVQQLEx5uQ2lwaGVyIERTRSBFU046
|
||||||
|
# N0FCNS0yREYyLURBM0YxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNl
|
||||||
|
# cnZpY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDoiKVSfklVAB4E
|
||||||
|
# Oc9+r95kl32muXNITYcTbaR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auAswHi1jgqo7Qd0HSIKHGNex7SOGgBfTWD4gCe4
|
||||||
|
# IzGJlFFmCT6pFsjvreEnaQLNBv+yOj9P1Pf4MDVrNQn0OLeWSxfpf+XfgECLi0LS
|
||||||
|
# QMxcy5Q0PezBaxQKzBTp39mT
|
||||||
|
# SIG # End signature block
|
154
packages/EntityFramework.6.2.0/tools/install.ps1
vendored
Normal file
154
packages/EntityFramework.6.2.0/tools/install.ps1
vendored
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
param($installPath, $toolsPath, $package, $project)
|
||||||
|
|
||||||
|
Initialize-EFConfiguration $project
|
||||||
|
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
|
||||||
|
|
||||||
|
Write-Host
|
||||||
|
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."
|
||||||
|
|
||||||
|
# SIG # Begin signature block
|
||||||
|
# MIIa3gYJKoZIhvcNAQcCoIIazzCCGssCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
|
||||||
|
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
|
||||||
|
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUt8mwpdjiFmu2B4KBh+vEeQ+V
|
||||||
|
# VnSgghWAMIIEwjCCA6qgAwIBAgITMwAAALu2dyRxSiAAIAAAAAAAuzANBgkqhkiG
|
||||||
|
# 9w0BAQUFADB3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G
|
||||||
|
# A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEw
|
||||||
|
# HwYDVQQDExhNaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTYwOTA3MTc1ODQ3
|
||||||
|
# WhcNMTgwOTA3MTc1ODQ3WjCBsjELMAkGA1UEB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||||
|
# AstOIBNQmd16QOJXu69YmhzhHQGGrLt48ovQ7DsB7uK+jwoFyI1I4vBTFd1Pq5Lk
|
||||||
|
# 541q1YDB5pTyBi+FA+mRKiQicPv2/OR4mS4N9wficLwYTp2OawpylbihOZxnLcVR
|
||||||
|
# DupiXD8WmIsgP+IHGjL5zDFKdjE9K3ILyOpwPf+FChPfwgphjvDXuBfrTot/xTUr
|
||||||
|
# XqO/67x9C0J71FNyIe4wyrt4ZVxbARcKFA7S2hSY9Ty5ZlizLS/n+YWGzFFW6J1w
|
||||||
|
# lGysOUzU9nm/qhh6YinvopspNAZ3GmLJPR5tH4LwC8csu89Ds+X57H2146SodDW4
|
||||||
|
# TsVxIxImdgs8UoxxWkZDFLyzs7BNZ8ifQv+AeSGAnhUwZuhCEl4ayJ4iIdBD6Svp
|
||||||
|
# u/RIzCzU2DKATCYqSCRfWupW76bemZ3KOm+9gSd0BhHudiG/m4LBJ1S2sWo9iaF2
|
||||||
|
# YbRuoROmv6pH8BJv/YoybLL+31HIjCPJZr2dHYcSZAI9La9Zj7jkIeW1sMpjtHhU
|
||||||
|
# BdRBLlCslLCleKuzoJZ1GtmShxN1Ii8yqAhuoFuMJb+g74TKIdbrHk/Jmu5J4PcB
|
||||||
|
# ZW+JC33Iacjmbuqnl84xKf8OxVtc2E0bodj6L54/LlUWa8kTo/0xggTIMIIExAIB
|
||||||
|
# ATCBkDB5MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE
|
||||||
|
# BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSMwIQYD
|
||||||
|
# VQQDExpNaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQQITMwAAAXglWrXNI8ZflQAB
|
||||||
|
# AAABeDAJBgUrDgMCGgUAoIHhMBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwG
|
||||||
|
# CisGAQQBgjcCAQsxDjAMBgorBgE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DEzMzlaMCMGCSqG
|
||||||
|
# SIb3DQEJBDEWBBR5eDKlzjbXG+gQhPSdEMDmmjY6BTANBgkqhkiG9w0BAQUFAASC
|
||||||
|
# AQB777+HNR9jVbg2sXZm72fSrm3jxSLugzhcA4OxhZObW96AnJknlduQvAGqcDV+
|
||||||
|
# Lt9CyaYLMt6I89MGkP9PBv8t5xhW0rHuBykna+5tTL8wvYrKd7r4ZvXT7YtHrqxO
|
||||||
|
# c+WLBPUD8XvSxI2wEsXt6uPCt44sd8PdO7VMiRNWth9aWo7rWaP0kGGAt0qhspI8
|
||||||
|
# 6mhsnam+SRGuDCpoLYcMTc1vVVKu1zZ9wgfxNCaf9YVswKmFc7Mj7VNpA3qd6Te0
|
||||||
|
# RNAEkgZr84KzCf8CYtWMsSy9k68drBbP0JosTxCLrJ9/zud6fykp5UcljzdKHKdU
|
||||||
|
# LMT4QBU8ya4StU9IgrUFBBcI
|
||||||
|
# SIG # End signature block
|
BIN
packages/EntityFramework.6.2.0/tools/migrate.exe
vendored
Normal file
BIN
packages/EntityFramework.6.2.0/tools/migrate.exe
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user