Skip to content

Commit

Permalink
Connected EF
Browse files Browse the repository at this point in the history
  • Loading branch information
eriquz committed Apr 19, 2022
1 parent 73c03c7 commit 90dc76f
Show file tree
Hide file tree
Showing 18 changed files with 2,247 additions and 0 deletions.
16 changes: 16 additions & 0 deletions SAT.DATA.EF/App.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<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>
<connectionStrings>
<add name="SchedulingAdministrationToolEntities" connectionString="metadata=res://*/SchedulingAdminTool.csdl|res://*/SchedulingAdminTool.ssdl|res://*/SchedulingAdminTool.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\sqlexpress;initial catalog=SchedulingAdministrationTool;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
34 changes: 34 additions & 0 deletions SAT.DATA.EF/Cours.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <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 SAT.DATA.EF
{
using System;
using System.Collections.Generic;

public partial class Cours
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public Cours()
{
this.ScheduledClasses = new HashSet<ScheduledClass>();
}

public int CourseID { get; set; }
public string CourseName { get; set; }
public string CourseDescription { get; set; }
public byte CreditHours { get; set; }
public string Curriculum { get; set; }
public string Notes { get; set; }
public bool IsActive { get; set; }

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<ScheduledClass> ScheduledClasses { get; set; }
}
}
25 changes: 25 additions & 0 deletions SAT.DATA.EF/Enrollment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace SAT.DATA.EF
{
using System;
using System.Collections.Generic;

public partial class Enrollment
{
public int EnrollmentID { get; set; }
public int StudentID { get; set; }
public int ScheduledClassID { get; set; }
public System.DateTime EnrollmentDate { get; set; }

public virtual ScheduledClass ScheduledClass { get; set; }
public virtual Student Student { get; set; }
}
}
36 changes: 36 additions & 0 deletions SAT.DATA.EF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SAT.DATA.EF")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SAT.DATA.EF")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c8271f77-ffc8-45ac-8b77-a9a1a0e93c57")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
117 changes: 117 additions & 0 deletions SAT.DATA.EF/SAT.DATA.EF.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C8271F77-FFC8-45AC-8B77-A9A1A0E93C57}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SAT.DATA.EF</RootNamespace>
<AssemblyName>SAT.DATA.EF</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<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="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Cours.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="Enrollment.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScheduledClass.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="ScheduledClassStatus.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="SchedulingAdminTool.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SchedulingAdminTool.Context.tt</DependentUpon>
</Compile>
<Compile Include="SchedulingAdminTool.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="SchedulingAdminTool.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SchedulingAdminTool.edmx</DependentUpon>
</Compile>
<Compile Include="Student.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
<Compile Include="StudentStatus.cs">
<DependentUpon>SchedulingAdminTool.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EntityDeploy Include="SchedulingAdminTool.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>SchedulingAdminTool.Designer.cs</LastGenOutput>
</EntityDeploy>
</ItemGroup>
<ItemGroup>
<None Include="App.Config" />
<None Include="packages.config" />
<None Include="SchedulingAdminTool.edmx.diagram">
<DependentUpon>SchedulingAdminTool.edmx</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="SchedulingAdminTool.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>SchedulingAdminTool.Context.cs</LastGenOutput>
<DependentUpon>SchedulingAdminTool.edmx</DependentUpon>
</Content>
<Content Include="SchedulingAdminTool.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>SchedulingAdminTool.edmx</DependentUpon>
<LastGenOutput>SchedulingAdminTool.cs</LastGenOutput>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
36 changes: 36 additions & 0 deletions SAT.DATA.EF/ScheduledClass.cs
Original file line number Diff line number Diff line change
@@ -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 SAT.DATA.EF
{
using System;
using System.Collections.Generic;

public partial class ScheduledClass
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public ScheduledClass()
{
this.Enrollments = new HashSet<Enrollment>();
}

public int ScheduledClassID { get; set; }
public int CourseID { get; set; }
public System.DateTime StartDate { get; set; }
public System.DateTime EndDate { get; set; }
public string InstructorName { get; set; }
public string Location { get; set; }
public int SCSID { get; set; }

public virtual Cours Cours { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Enrollment> Enrollments { get; set; }
public virtual ScheduledClassStatus ScheduledClassStatus { get; set; }
}
}
29 changes: 29 additions & 0 deletions SAT.DATA.EF/ScheduledClassStatus.cs
Original file line number Diff line number Diff line change
@@ -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 SAT.DATA.EF
{
using System;
using System.Collections.Generic;

public partial class ScheduledClassStatus
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public ScheduledClassStatus()
{
this.ScheduledClasses = new HashSet<ScheduledClass>();
}

public int SCSID { get; set; }
public string SCSName { get; set; }

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<ScheduledClass> ScheduledClasses { get; set; }
}
}
35 changes: 35 additions & 0 deletions SAT.DATA.EF/SchedulingAdminTool.Context.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <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 SAT.DATA.EF
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;

public partial class SchedulingAdministrationToolEntities : DbContext
{
public SchedulingAdministrationToolEntities()
: base("name=SchedulingAdministrationToolEntities")
{
}

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}

public virtual DbSet<Cours> Courses { get; set; }
public virtual DbSet<Enrollment> Enrollments { get; set; }
public virtual DbSet<ScheduledClass> ScheduledClasses { get; set; }
public virtual DbSet<ScheduledClassStatus> ScheduledClassStatuses { get; set; }
public virtual DbSet<Student> Students { get; set; }
public virtual DbSet<StudentStatus> StudentStatuses { get; set; }
}
}
Loading

0 comments on commit 90dc76f

Please sign in to comment.