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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = suggestion
27 changes: 27 additions & 0 deletions Private_Practice.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29709.97
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Private_Practice", "Private_Practice\Private_Practice.csproj", "{CD7090E5-ED9F-4FFA-B9B2-CE5EDD7EFA5C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2FCAD483-1318-44CE-AC89-89880972878A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CD7090E5-ED9F-4FFA-B9B2-CE5EDD7EFA5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD7090E5-ED9F-4FFA-B9B2-CE5EDD7EFA5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD7090E5-ED9F-4FFA-B9B2-CE5EDD7EFA5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD7090E5-ED9F-4FFA-B9B2-CE5EDD7EFA5C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F87367E5-FE70-4358-BE5F-E33F28153850}
EndGlobalSection
EndGlobal
43 changes: 43 additions & 0 deletions Private_Practice/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Private_Practice.Models;

namespace Private_Practice.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}

public IActionResult About()
{
ViewData["Message"] = "Your application description page.";

return View();
}

public IActionResult Contact()
{
ViewData["Message"] = "Your contact page.";

return View();
}

public IActionResult Privacy()
{
return View();
}

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}
18 changes: 18 additions & 0 deletions Private_Practice/DAL/PracticeContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Private_Practice.Models;
using Microsoft.EntityFrameworkCore;
using System.Configuration;

namespace Private_Practice.DAL
{
public class PracticeContext : DbContext
{
public PracticeContext(DbContextOptions<PracticeContext>Options) : base(Options)
{
}
public DbSet<Person> Persons { get; set; }
public DbSet<Doctor> Doctors { get; set; }
public DbSet<Client> Clients { get; set; }
public DbSet<Illness> Illnesses { get; set; }
public DbSet<Visit> Visits { get; set; }
}
}
135 changes: 135 additions & 0 deletions Private_Practice/Migrations/20200120212331_Initial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 92 additions & 0 deletions Private_Practice/Migrations/20200120212331_Initial.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Private_Practice.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(nullable: true),
Surname = table.Column<string>(nullable: true),
Gender = table.Column<int>(nullable: true),
IdNumber = table.Column<int>(nullable: false),
Email = table.Column<string>(nullable: true),
ContactNo = table.Column<int>(nullable: false),
Active = table.Column<bool>(nullable: false),
PersonId = table.Column<Guid>(nullable: false),
IllnessId = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.ClientId);
});

migrationBuilder.CreateTable(
name: "Doctors",
columns: table => new
{
DoctorId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(nullable: true),
Surname = table.Column<string>(nullable: true),
Gender = table.Column<int>(nullable: true),
IdNumber = table.Column<int>(nullable: false),
Email = table.Column<string>(nullable: true),
ContactNo = table.Column<int>(nullable: false),
Active = table.Column<bool>(nullable: false),
PersonId = table.Column<Guid>(nullable: false),
Specialist = table.Column<string>(nullable: true),
CountryCode = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Doctors", x => x.DoctorId);
});

migrationBuilder.CreateTable(
name: "Illnesses",
columns: table => new
{
IllnessId = table.Column<string>(nullable: false),
IllnessName = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Illnesses", x => x.IllnessId);
});

migrationBuilder.CreateTable(
name: "Visit",
columns: table => new
{
VisitId = table.Column<Guid>(nullable: false),
DoctorId = table.Column<Guid>(nullable: false),
ClientId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Visit", x => x.VisitId);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Clients");

migrationBuilder.DropTable(
name: "Doctors");

migrationBuilder.DropTable(
name: "Illnesses");

migrationBuilder.DropTable(
name: "Visit");
}
}
}
Loading