sme litte changes ( most of them auto-changes of visual studio)
This commit is contained in:
parent
31131c9cc0
commit
6f6362a28e
|
@ -13,13 +13,10 @@ namespace Web_Server_EHEC
|
|||
[ServiceContract]
|
||||
public interface IService
|
||||
{
|
||||
[OperationContract]
|
||||
[WebGet(UriTemplate="DoWork/",RequestFormat = WebMessageFormat.Json)]
|
||||
string DoWork();
|
||||
|
||||
|
||||
[OperationContract]
|
||||
void WritePatient(Person person);
|
||||
void WritePatient(Patient patient);
|
||||
[OperationContract]
|
||||
void WriteExam(Exam exam);
|
||||
[OperationContract]
|
||||
|
|
|
@ -11,6 +11,8 @@ namespace Web_Server_EHEC.Model
|
|||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Web_Server_EHEC.DAL;
|
||||
using Web_Server_EHEC.ISL;
|
||||
|
||||
public partial class Doctor : Person
|
||||
{
|
||||
|
@ -21,13 +23,12 @@ namespace Web_Server_EHEC.Model
|
|||
}
|
||||
|
||||
public int DoctorId { get; set; }
|
||||
public int DoctortypeId { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Exam> Exam { get; set; }
|
||||
public virtual Doctortype Doctortype { get; set; }
|
||||
|
||||
|
||||
internal List<Doctor> GetAllDoctors()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 Web_Server_EHEC.Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Doctortype
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public Doctortype()
|
||||
{
|
||||
this.Doctor = new HashSet<Doctor>();
|
||||
}
|
||||
|
||||
public int TypeId { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Doctor> Doctor { get; set; }
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ namespace Web_Server_EHEC.Model
|
|||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
using Web_Server_EHEC.ISL;
|
||||
|
||||
public partial class EHEC_DB_ModelContainer : DbContext
|
||||
{
|
||||
|
@ -24,10 +25,11 @@ namespace Web_Server_EHEC.Model
|
|||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
public virtual DbSet<Person> PersonSet { get; set; }
|
||||
public virtual DbSet<Doctor> DoctorSet { get; set; }
|
||||
public virtual DbSet<Patient> PatientSet { get; set; }
|
||||
public virtual DbSet<Origin> OriginSet { get; set; }
|
||||
public virtual DbSet<Exam> ExamSet { get; set; }
|
||||
public virtual DbSet<Result> ResultSet { get; set; }
|
||||
public virtual DbSet<Doctortype> DoctortypeSet { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<EntitySet Name="OriginSet" EntityType="EHEC_DB_Model.Store.OriginSet" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="ExamSet" EntityType="EHEC_DB_Model.Store.ExamSet" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="ResultSet" EntityType="EHEC_DB_Model.Store.ResultSet" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="DoctortypeSet" EntityType="EHEC_DB_Model.Store.DoctortypeSet" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="PersonSet_Doctor" EntityType="EHEC_DB_Model.Store.PersonSet_Doctor" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="PersonSet_Patient" EntityType="EHEC_DB_Model.Store.PersonSet_Patient" store:Type="Tables" Schema="dbo" />
|
||||
<AssociationSet Name="ResultExam" Association="EHEC_DB_Model.Store.ResultExam">
|
||||
|
@ -24,6 +25,14 @@
|
|||
<End Role="Patient" EntitySet="PersonSet_Patient" />
|
||||
<End Role="Exam" EntitySet="ExamSet" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="OriginExam" Association="EHEC_DB_Model.Store.OriginExam">
|
||||
<End Role="Origin" EntitySet="OriginSet" />
|
||||
<End Role="Exam" EntitySet="ExamSet" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="DoctortypeDoctor" Association="EHEC_DB_Model.Store.DoctortypeDoctor">
|
||||
<End Role="Doctortype" EntitySet="DoctortypeSet" />
|
||||
<End Role="Doctor" EntitySet="PersonSet_Doctor" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Doctor_inherits_Person" Association="EHEC_DB_Model.Store.FK_Doctor_inherits_Person">
|
||||
<End Role="Person" EntitySet="PersonSet" />
|
||||
<End Role="Doctor" EntitySet="PersonSet_Doctor" />
|
||||
|
@ -40,9 +49,9 @@
|
|||
<Property Name="PersonId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="Firstname" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Lastname" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Birthdate" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Birthdate" Type="datetime" Nullable="false" />
|
||||
<Property Name="Street" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Place" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="City" Type="nvarchar(max)" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="OriginSet">
|
||||
<Key>
|
||||
|
@ -51,8 +60,8 @@
|
|||
<Property Name="OriginId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="SicknessId" Type="int" Nullable="false" />
|
||||
<Property Name="Name" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="City" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Street" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="City" Type="nvarchar(max)" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="ExamSet">
|
||||
<Key>
|
||||
|
@ -60,8 +69,9 @@
|
|||
</Key>
|
||||
<Property Name="ExamId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="DoctorId" Type="int" Nullable="false" />
|
||||
<Property Name="SicknessStatus" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="SicknessStatus" Type="bit" Nullable="false" />
|
||||
<Property Name="SicknessDesignation" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="OriginOriginId" Type="int" Nullable="false" />
|
||||
<Property Name="Result_ResultId" Type="int" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="ResultSet">
|
||||
|
@ -69,7 +79,14 @@
|
|||
<PropertyRef Name="ResultId" />
|
||||
</Key>
|
||||
<Property Name="ResultId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="Name" Type="nvarchar(max)" Nullable="false" />
|
||||
<Property Name="Description" Type="nvarchar(max)" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="DoctortypeSet">
|
||||
<Key>
|
||||
<PropertyRef Name="TypeId" />
|
||||
</Key>
|
||||
<Property Name="TypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="Name" Type="nvarchar(max)" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonSet_Doctor">
|
||||
|
@ -77,6 +94,7 @@
|
|||
<PropertyRef Name="PersonId" />
|
||||
</Key>
|
||||
<Property Name="DoctorId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="DoctortypeId" Type="int" Nullable="false" />
|
||||
<Property Name="PersonId" Type="int" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonSet_Patient">
|
||||
|
@ -123,6 +141,30 @@
|
|||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="OriginExam">
|
||||
<End Role="Origin" Type="EHEC_DB_Model.Store.OriginSet" Multiplicity="1" />
|
||||
<End Role="Exam" Type="EHEC_DB_Model.Store.ExamSet" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Origin">
|
||||
<PropertyRef Name="OriginId" />
|
||||
</Principal>
|
||||
<Dependent Role="Exam">
|
||||
<PropertyRef Name="OriginOriginId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="DoctortypeDoctor">
|
||||
<End Role="Doctortype" Type="EHEC_DB_Model.Store.DoctortypeSet" Multiplicity="1" />
|
||||
<End Role="Doctor" Type="EHEC_DB_Model.Store.PersonSet_Doctor" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Doctortype">
|
||||
<PropertyRef Name="TypeId" />
|
||||
</Principal>
|
||||
<Dependent Role="Doctor">
|
||||
<PropertyRef Name="DoctortypeId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Doctor_inherits_Person">
|
||||
<End Role="Person" Type="EHEC_DB_Model.Store.PersonSet" Multiplicity="1">
|
||||
<OnDelete Action="Cascade" />
|
||||
|
@ -176,10 +218,17 @@
|
|||
<End Role="Origin" EntitySet="OriginSet" />
|
||||
<End Role="Exam" EntitySet="ExamSet" />
|
||||
</AssociationSet>
|
||||
<EntitySet Name="DoctortypeSet" EntityType="EHEC_DB_Model.Doctortype" />
|
||||
<AssociationSet Name="DoctortypeDoctor" Association="EHEC_DB_Model.DoctortypeDoctor">
|
||||
<End Role="Doctortype" EntitySet="DoctortypeSet" />
|
||||
<End Role="Doctor" EntitySet="PersonSet" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<EntityType Name="Doctor" BaseType="EHEC_DB_Model.Person">
|
||||
<Property Name="DoctorId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<NavigationProperty Name="Exam" Relationship="EHEC_DB_Model.DoctorExam" FromRole="Doctor" ToRole="Exam" />
|
||||
<NavigationProperty Name="Doctortype" Relationship="EHEC_DB_Model.DoctortypeDoctor" FromRole="Doctor" ToRole="Doctortype" />
|
||||
<Property Name="DoctortypeId" Type="Int32" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
|
@ -262,6 +311,26 @@
|
|||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<EntityType Name="Doctortype">
|
||||
<Key>
|
||||
<PropertyRef Name="TypeId" />
|
||||
</Key>
|
||||
<Property Name="TypeId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<NavigationProperty Name="Doctor" Relationship="EHEC_DB_Model.DoctortypeDoctor" FromRole="Doctortype" ToRole="Doctor" />
|
||||
<Property Name="Name" Type="String" Nullable="false" />
|
||||
</EntityType>
|
||||
<Association Name="DoctortypeDoctor">
|
||||
<End Type="EHEC_DB_Model.Doctortype" Role="Doctortype" Multiplicity="1" />
|
||||
<End Type="EHEC_DB_Model.Doctor" Role="Doctor" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Doctortype">
|
||||
<PropertyRef Name="TypeId" />
|
||||
</Principal>
|
||||
<Dependent Role="Doctor">
|
||||
<PropertyRef Name="DoctortypeId" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
|
@ -276,13 +345,14 @@
|
|||
<ScalarProperty Name="Lastname" ColumnName="Lastname" />
|
||||
<ScalarProperty Name="Birthdate" ColumnName="Birthdate" />
|
||||
<ScalarProperty Name="Street" ColumnName="Street" />
|
||||
<ScalarProperty Name="City" ColumnName="Place" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
<EntityTypeMapping TypeName="IsTypeOf(EHEC_DB_Model.Doctor)">
|
||||
<MappingFragment StoreEntitySet="PersonSet_Doctor">
|
||||
<ScalarProperty Name="PersonId" ColumnName="PersonId" />
|
||||
<ScalarProperty Name="DoctorId" ColumnName="DoctorId" />
|
||||
<ScalarProperty Name="DoctortypeId" ColumnName="DoctortypeId" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
<EntityTypeMapping TypeName="IsTypeOf(EHEC_DB_Model.Patient)">
|
||||
|
@ -298,8 +368,8 @@
|
|||
<ScalarProperty Name="OriginId" ColumnName="OriginId" />
|
||||
<ScalarProperty Name="SicknessId" ColumnName="SicknessId" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
<ScalarProperty Name="Street" ColumnName="Street" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
|
@ -310,6 +380,7 @@
|
|||
<ScalarProperty Name="DoctorId" ColumnName="DoctorId" />
|
||||
<ScalarProperty Name="SicknessStatus" ColumnName="SicknessStatus" />
|
||||
<ScalarProperty Name="SicknessDesignation" ColumnName="SicknessDesignation" />
|
||||
<ScalarProperty Name="OriginOriginId" ColumnName="OriginOriginId" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
|
@ -317,7 +388,15 @@
|
|||
<EntityTypeMapping TypeName="IsTypeOf(EHEC_DB_Model.Result)">
|
||||
<MappingFragment StoreEntitySet="ResultSet">
|
||||
<ScalarProperty Name="ResultId" ColumnName="ResultId" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="DoctortypeSet">
|
||||
<EntityTypeMapping TypeName="IsTypeOf(EHEC_DB_Model.Doctortype)">
|
||||
<MappingFragment StoreEntitySet="DoctortypeSet">
|
||||
<ScalarProperty Name="TypeId" ColumnName="TypeId" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<Diagram DiagramId="72878f5930384ee2952c65b3586f5d91" Name="Diagram1" >
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Doctor" Width="1.5" PointX="4.625" PointY="4.375" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Person" Width="1.5" PointX="1.375" PointY="0.5" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Origin" Width="1.5" PointX="10.625" PointY="2.875" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Origin" Width="1.5" PointX="10.875" PointY="2.125" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Exam" Width="1.5" PointX="8.125" PointY="0.5" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Result" Width="1.5" PointX="8.125" PointY="4.375" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Result" Width="1.5" PointX="8.125" PointY="4.125" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Patient" Width="1.5" PointX="4.625" PointY="0.5" />
|
||||
<AssociationConnector Association="EHEC_DB_Model.ResultExam" />
|
||||
<InheritanceConnector EntityType="EHEC_DB_Model.Patient" />
|
||||
|
@ -17,6 +17,8 @@
|
|||
<AssociationConnector Association="EHEC_DB_Model.DoctorExam" />
|
||||
<AssociationConnector Association="EHEC_DB_Model.PatientExam" />
|
||||
<AssociationConnector Association="EHEC_DB_Model.OriginExam" />
|
||||
<EntityTypeShape EntityType="EHEC_DB_Model.Doctortype" Width="1.5" PointX="1.875" PointY="4.375" />
|
||||
<AssociationConnector Association="EHEC_DB_Model.DoctortypeDoctor" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
-- --------------------------------------------------
|
||||
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
|
||||
-- --------------------------------------------------
|
||||
-- Date Created: 06/08/2018 14:41:29
|
||||
-- Date Created: 06/09/2018 13:24:19
|
||||
-- Generated from EDMX file: C:\Users\ism_c\source\repos\oop_II-6\Web_Server_EHEC\Web_Server_EHEC\Model\EHEC_DB_Model.edmx
|
||||
-- --------------------------------------------------
|
||||
|
||||
|
@ -26,12 +26,18 @@ GO
|
|||
IF OBJECT_ID(N'[dbo].[FK_PatientExam]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[PersonSet_Patient] DROP CONSTRAINT [FK_PatientExam];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK_Patient_inherits_Person]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[PersonSet_Patient] DROP CONSTRAINT [FK_Patient_inherits_Person];
|
||||
IF OBJECT_ID(N'[dbo].[FK_OriginExam]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[ExamSet] DROP CONSTRAINT [FK_OriginExam];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK_DoctortypeDoctor]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[PersonSet_Doctor] DROP CONSTRAINT [FK_DoctortypeDoctor];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK_Doctor_inherits_Person]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[PersonSet_Doctor] DROP CONSTRAINT [FK_Doctor_inherits_Person];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK_Patient_inherits_Person]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[PersonSet_Patient] DROP CONSTRAINT [FK_Patient_inherits_Person];
|
||||
GO
|
||||
|
||||
-- --------------------------------------------------
|
||||
-- Dropping existing tables
|
||||
|
@ -49,12 +55,15 @@ GO
|
|||
IF OBJECT_ID(N'[dbo].[ResultSet]', 'U') IS NOT NULL
|
||||
DROP TABLE [dbo].[ResultSet];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[PersonSet_Patient]', 'U') IS NOT NULL
|
||||
DROP TABLE [dbo].[PersonSet_Patient];
|
||||
IF OBJECT_ID(N'[dbo].[DoctortypeSet]', 'U') IS NOT NULL
|
||||
DROP TABLE [dbo].[DoctortypeSet];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[PersonSet_Doctor]', 'U') IS NOT NULL
|
||||
DROP TABLE [dbo].[PersonSet_Doctor];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[PersonSet_Patient]', 'U') IS NOT NULL
|
||||
DROP TABLE [dbo].[PersonSet_Patient];
|
||||
GO
|
||||
|
||||
-- --------------------------------------------------
|
||||
-- Creating all tables
|
||||
|
@ -65,9 +74,9 @@ CREATE TABLE [dbo].[PersonSet] (
|
|||
[PersonId] int IDENTITY(1,1) NOT NULL,
|
||||
[Firstname] nvarchar(max) NOT NULL,
|
||||
[Lastname] nvarchar(max) NOT NULL,
|
||||
[Birthdate] nvarchar(max) NOT NULL,
|
||||
[Birthdate] datetime NOT NULL,
|
||||
[Street] nvarchar(max) NOT NULL,
|
||||
[Place] nvarchar(max) NOT NULL
|
||||
[City] nvarchar(max) NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
|
@ -76,8 +85,8 @@ CREATE TABLE [dbo].[OriginSet] (
|
|||
[OriginId] int IDENTITY(1,1) NOT NULL,
|
||||
[SicknessId] int NOT NULL,
|
||||
[Name] nvarchar(max) NOT NULL,
|
||||
[City] nvarchar(max) NOT NULL,
|
||||
[Street] nvarchar(max) NOT NULL
|
||||
[Street] nvarchar(max) NOT NULL,
|
||||
[City] nvarchar(max) NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
|
@ -85,8 +94,9 @@ GO
|
|||
CREATE TABLE [dbo].[ExamSet] (
|
||||
[ExamId] int IDENTITY(1,1) NOT NULL,
|
||||
[DoctorId] int NOT NULL,
|
||||
[SicknessStatus] nvarchar(max) NOT NULL,
|
||||
[SicknessStatus] bit NOT NULL,
|
||||
[SicknessDesignation] nvarchar(max) NOT NULL,
|
||||
[OriginOriginId] int NOT NULL,
|
||||
[Result_ResultId] int NOT NULL
|
||||
);
|
||||
GO
|
||||
|
@ -94,7 +104,14 @@ GO
|
|||
-- Creating table 'ResultSet'
|
||||
CREATE TABLE [dbo].[ResultSet] (
|
||||
[ResultId] int IDENTITY(1,1) NOT NULL,
|
||||
[Description] nvarchar(max) NOT NULL,
|
||||
[Name] nvarchar(max) NOT NULL,
|
||||
[Description] nvarchar(max) NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
-- Creating table 'DoctortypeSet'
|
||||
CREATE TABLE [dbo].[DoctortypeSet] (
|
||||
[TypeId] int IDENTITY(1,1) NOT NULL,
|
||||
[Name] nvarchar(max) NOT NULL
|
||||
);
|
||||
GO
|
||||
|
@ -102,6 +119,7 @@ GO
|
|||
-- Creating table 'PersonSet_Doctor'
|
||||
CREATE TABLE [dbo].[PersonSet_Doctor] (
|
||||
[DoctorId] int IDENTITY(1,1) NOT NULL,
|
||||
[DoctortypeId] int NOT NULL,
|
||||
[PersonId] int NOT NULL
|
||||
);
|
||||
GO
|
||||
|
@ -142,6 +160,12 @@ ADD CONSTRAINT [PK_ResultSet]
|
|||
PRIMARY KEY CLUSTERED ([ResultId] ASC);
|
||||
GO
|
||||
|
||||
-- Creating primary key on [TypeId] in table 'DoctortypeSet'
|
||||
ALTER TABLE [dbo].[DoctortypeSet]
|
||||
ADD CONSTRAINT [PK_DoctortypeSet]
|
||||
PRIMARY KEY CLUSTERED ([TypeId] ASC);
|
||||
GO
|
||||
|
||||
-- Creating primary key on [PersonId] in table 'PersonSet_Doctor'
|
||||
ALTER TABLE [dbo].[PersonSet_Doctor]
|
||||
ADD CONSTRAINT [PK_PersonSet_Doctor]
|
||||
|
@ -203,6 +227,36 @@ ON [dbo].[PersonSet_Patient]
|
|||
([Exam_ExamId]);
|
||||
GO
|
||||
|
||||
-- Creating foreign key on [OriginOriginId] in table 'ExamSet'
|
||||
ALTER TABLE [dbo].[ExamSet]
|
||||
ADD CONSTRAINT [FK_OriginExam]
|
||||
FOREIGN KEY ([OriginOriginId])
|
||||
REFERENCES [dbo].[OriginSet]
|
||||
([OriginId])
|
||||
ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
GO
|
||||
|
||||
-- Creating non-clustered index for FOREIGN KEY 'FK_OriginExam'
|
||||
CREATE INDEX [IX_FK_OriginExam]
|
||||
ON [dbo].[ExamSet]
|
||||
([OriginOriginId]);
|
||||
GO
|
||||
|
||||
-- Creating foreign key on [DoctortypeId] in table 'PersonSet_Doctor'
|
||||
ALTER TABLE [dbo].[PersonSet_Doctor]
|
||||
ADD CONSTRAINT [FK_DoctortypeDoctor]
|
||||
FOREIGN KEY ([DoctortypeId])
|
||||
REFERENCES [dbo].[DoctortypeSet]
|
||||
([TypeId])
|
||||
ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
GO
|
||||
|
||||
-- Creating non-clustered index for FOREIGN KEY 'FK_DoctortypeDoctor'
|
||||
CREATE INDEX [IX_FK_DoctortypeDoctor]
|
||||
ON [dbo].[PersonSet_Doctor]
|
||||
([DoctortypeId]);
|
||||
GO
|
||||
|
||||
-- Creating foreign key on [PersonId] in table 'PersonSet_Doctor'
|
||||
ALTER TABLE [dbo].[PersonSet_Doctor]
|
||||
ADD CONSTRAINT [FK_Doctor_inherits_Person]
|
||||
|
|
|
@ -27,12 +27,6 @@ namespace Web_Server_EHEC.Model
|
|||
public int OriginOriginId { get; set; }
|
||||
|
||||
public virtual Result Result { get; set; }
|
||||
|
||||
internal void CreateExam(Exam exam)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual Doctor Doctor { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Patient> Patient { get; set; }
|
||||
|
|
|
@ -19,12 +19,6 @@ namespace Web_Server_EHEC.Model
|
|||
public string Lastname { get; set; }
|
||||
public System.DateTime Birthdate { get; set; }
|
||||
public string Street { get; set; }
|
||||
|
||||
internal void CreatePerson(Person person)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string City { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,5 @@ namespace Web_Server_EHEC.Model
|
|||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Exam> Exam { get; set; }
|
||||
|
||||
internal void CreateResult(Result result)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ using System.Runtime.Serialization;
|
|||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
using Web_Server_EHEC.Model;
|
||||
using System.Data.Entity;
|
||||
using Web_Server_EHEC.DAL;
|
||||
using Web_Server_EHEC.ISL;
|
||||
|
||||
namespace Web_Server_EHEC
|
||||
{
|
||||
|
@ -12,33 +15,30 @@ namespace Web_Server_EHEC
|
|||
// NOTE: In order to launch WCF Test Client for testing this service, please select Service.svc or Service.svc.cs at the Solution Explorer and start debugging.
|
||||
public class Service : IService
|
||||
{
|
||||
public string DoWork()
|
||||
{
|
||||
return "Hello";
|
||||
}
|
||||
|
||||
public void WritePatient(Person person)
|
||||
public void WritePatient(Patient patient)
|
||||
{
|
||||
Person dataaccess = new Person();
|
||||
dataaccess.CreatePerson(person);
|
||||
PatientISL dataaccess = new PatientISL();
|
||||
dataaccess.CreatePatient(patient);
|
||||
}
|
||||
|
||||
public void WriteResult(Result result)
|
||||
{
|
||||
Result dataaccess = new Result();
|
||||
ResultISL dataaccess = new ResultISL();
|
||||
dataaccess.CreateResult(result);
|
||||
}
|
||||
|
||||
public void WriteExam(Exam exam)
|
||||
{
|
||||
Exam dataaccess = new Exam();
|
||||
ExamISL dataaccess = new ExamISL();
|
||||
dataaccess.CreateExam(exam);
|
||||
}
|
||||
|
||||
public List<Doctor> GetDoctors()
|
||||
public void WriteDoctor(Doctor doctor)
|
||||
{
|
||||
Doctor dataaccess = new Doctor();
|
||||
return dataaccess.GetAllDoctors();
|
||||
DoctorISL dataaccess = new DoctorISL();
|
||||
dataaccess.CreateDoctor(doctor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
https://go.microsoft.com/fwlink/?LinkId=169433
|
||||
|
@ -29,13 +29,16 @@
|
|||
</behaviors>
|
||||
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
|
||||
<services>
|
||||
<service name ="Web_Server_EHEC.Service">
|
||||
<service name="Web_Server_EHEC.Service" >
|
||||
<endpoint address="soap" binding="basicHttpBinding" name="soap" contract="Web_Server_EHEC.IService"></endpoint>
|
||||
</service>
|
||||
</services>
|
||||
</system.serviceModel>
|
||||
<connectionStrings>
|
||||
<add name="EHEC_DB_ModelContainer" connectionString="metadata=res://*/Model.EHEC_DB_Model.csdl|res://*/Model.EHEC_DB_Model.ssdl|res://*/Model.EHEC_DB_Model.msl;provider=System.Data.SqlClient;provider connection string="data source=localhost;initial catalog=EHEC_MODEL_DB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||
<add name="EHEC_DB_ModelContainer" connectionString="metadata=res://*/Model.EHEC_DB_Model.csdl|res://*/Model.EHEC_DB_Model.ssdl|res://*/Model.EHEC_DB_Model.msl;provider=System.Data.SqlClient;provider connection string="data source=localhost;initial catalog=EHEC_MODEL_DB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework""
|
||||
providerName="System.Data.EntityClient" />
|
||||
<add name="Web_Server_EHECContext" connectionString="Data Source=(localdb)\MSSQLLocalDB; Initial Catalog=Web_Server_EHECContext-20180613182144; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Web_Server_EHECContext-20180613182144.mdf"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
|
|
|
@ -109,11 +109,20 @@
|
|||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DAL\DoctorDAL.cs" />
|
||||
<Compile Include="DAL\ExamDAL.cs" />
|
||||
<Compile Include="DAL\PatientDAL.cs" />
|
||||
<Compile Include="IService.cs" />
|
||||
<Compile Include="ISL\DoctorISL.cs" />
|
||||
<Compile Include="ISL\ExamISL.cs" />
|
||||
<Compile Include="ISL\PatientISL.cs" />
|
||||
<Compile Include="ISL\ResultISL.cs" />
|
||||
<Compile Include="Model\Doctor.cs">
|
||||
<DependentUpon>EHEC_DB_Model.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Doctortype.cs">
|
||||
<DependentUpon>EHEC_DB_Model.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\EHEC_DB_Model.Context.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
@ -159,7 +168,9 @@
|
|||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
|
Loading…
Reference in New Issue