Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions AsyncInn.Test/AsyncInn.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions AsyncInn.Web/AsyncInn.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
</ItemGroup>

Expand Down
15 changes: 9 additions & 6 deletions AsyncInn/AsyncInn.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand Down Expand Up @@ -40,14 +40,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.4">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
</ItemGroup>

</Project>
26 changes: 26 additions & 0 deletions AsyncInn/Models/Department.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AsyncInn.Models
{
public class Department
{
public long Id { get;set;}

public long Hotel_Id { get; set; }

public Hotel Hotel { get; set; }

public string Name { get; set; }

public string PhoneNumber { get; set; }

public string ExtensionNumber { get; set; }

public string Responsibilities { get; set; }

public ICollection<Employee> Employees { get; set; }
}
}
42 changes: 42 additions & 0 deletions AsyncInn/Models/Employee.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace AsyncInn.Models
{
public class Employee
{
public long Id { get; set; }

public long Department_Id { get; set; }

public Department Department { get; set; }

public string FirstName { get; set; }

public string LastName { get; set; }

[DataType(DataType.Date)]
public DateTime BirthDate { get; set; }

public string StreetAddress { get; set; }

public string City { get; set; }

public string State { get; set; }

public string Country { get; set; }

public string PostalCode { get; set; }

[Phone]
public string PrimaryContactNumber { get; set; }

[Phone]
public string MobileNumber { get; set; }

[Phone]
public string EmergencyContactNumber { get; set; }


}
}
2 changes: 2 additions & 0 deletions AsyncInn/Models/HotelRoom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class HotelRoom

[Required]
[Display(Name = "Rate")]
[DataType(DataType.Currency)]
[DisplayFormat(DataFormatString ="{0:C2}")]
public decimal Rate { get; set; }

//Refrences to other tables
Expand Down