From 5f2ef996c1b24f7d683e5f2d23fe84c6539a1447 Mon Sep 17 00:00:00 2001 From: Michael Rich Date: Mon, 4 Feb 2019 02:19:44 -0600 Subject: [PATCH 1/3] Created Project added Models and relationships and migrated to sqlserver --- .../Context/VolunteerSiteDbContext.cs | 19 ++ .../20190204080041_initial.Designer.cs | 168 ++++++++++++++++++ .../Migrations/20190204080041_initial.cs | 153 ++++++++++++++++ .../VolunteerSiteDbContextModelSnapshot.cs | 166 +++++++++++++++++ .../VolunteerSite.Data.csproj | 20 +++ .../Models/ErrorViewModel.cs | 11 ++ .../Models/GroupMember.cs | 19 ++ .../VolunteerSite.Domain/Models/JobListing.cs | 22 +++ .../Models/Organization.cs | 20 +++ .../VolunteerSite.Domain/Models/Volunteer.cs | 19 ++ .../Models/VolunteerGroup.cs | 17 ++ .../VolunteerSite.Domain.csproj | 16 ++ .../Controllers/HomeController.cs | 29 +++ .../Models/ErrorViewModel.cs | 11 ++ .../VolunteerSite.WebUI/Program.cs | 24 +++ .../Properties/launchSettings.json | 27 +++ .../VolunteerSite.WebUI/Startup.cs | 69 +++++++ .../Views/Home/Index.cshtml | 8 + .../Views/Home/Privacy.cshtml | 6 + .../Views/Shared/Error.cshtml | 25 +++ .../Views/Shared/_CookieConsentPartial.cshtml | 25 +++ .../Views/Shared/_Layout.cshtml | 77 ++++++++ .../Shared/_ValidationScriptsPartial.cshtml | 18 ++ .../Views/_ViewImports.cshtml | 3 + .../Views/_ViewStart.cshtml | 3 + .../VolunteerSite.WebUI.csproj | 20 +++ .../appsettings.Development.json | 9 + .../VolunteerSite.WebUI/appsettings.json | 8 + .../VolunteerSite.WebUI/wwwroot/css/site.css | 56 ++++++ .../VolunteerSite.WebUI/wwwroot/favicon.ico | Bin 0 -> 32038 bytes .../VolunteerSite.WebUI/wwwroot/js/site.js | 4 + .../Controllers/HomeController.cs | 29 +++ .../Models/ErrorViewModel.cs | 11 ++ .../VolunteerSite.WebUI2/Program.cs | 24 +++ .../Properties/launchSettings.json | 27 +++ .../VolunteerSite.WebUI2/Startup.cs | 64 +++++++ .../Views/Home/Index.cshtml | 8 + .../Views/Home/Privacy.cshtml | 6 + .../Views/Shared/Error.cshtml | 25 +++ .../Views/Shared/_CookieConsentPartial.cshtml | 25 +++ .../Views/Shared/_Layout.cshtml | 77 ++++++++ .../Shared/_ValidationScriptsPartial.cshtml | 18 ++ .../Views/_ViewImports.cshtml | 3 + .../Views/_ViewStart.cshtml | 3 + .../VolunteerSite.WebUI2.csproj | 14 ++ .../appsettings.Development.json | 9 + .../VolunteerSite.WebUI2/appsettings.json | 8 + .../VolunteerSite.WebUI2/wwwroot/css/site.css | 56 ++++++ .../VolunteerSite.WebUI2/wwwroot/favicon.ico | Bin 0 -> 32038 bytes .../VolunteerSite.WebUI2/wwwroot/js/site.js | 4 + VolunterSite.WebUI/VolunterSite.WebUI.sln | 37 ++++ .../Controllers/HomeController.cs | 43 +++++ .../Models/ErrorViewModel.cs | 11 ++ .../VolunterSite.WebUI/Program.cs | 24 +++ .../Properties/launchSettings.json | 27 +++ .../VolunterSite.WebUI/Startup.cs | 67 +++++++ .../Views/Home/About.cshtml | 7 + .../Views/Home/Contact.cshtml | 17 ++ .../Views/Home/Index.cshtml | 94 ++++++++++ .../Views/Home/Privacy.cshtml | 6 + .../Views/Shared/Error.cshtml | 22 +++ .../Views/Shared/_CookieConsentPartial.cshtml | 41 +++++ .../Views/Shared/_Layout.cshtml | 74 ++++++++ .../Shared/_ValidationScriptsPartial.cshtml | 18 ++ .../Views/_ViewImports.cshtml | 3 + .../Views/_ViewStart.cshtml | 3 + .../VolunterSite.WebUI.csproj | 12 ++ .../appsettings.Development.json | 9 + .../VolunterSite.WebUI/appsettings.json | 8 + .../VolunterSite.WebUI/wwwroot/css/site.css | 37 ++++ .../wwwroot/css/site.min.css | 1 + .../VolunterSite.WebUI/wwwroot/favicon.ico | Bin 0 -> 32038 bytes .../wwwroot/images/banner1.svg | 1 + .../wwwroot/images/banner2.svg | 1 + .../wwwroot/images/banner3.svg | 1 + .../VolunterSite.WebUI/wwwroot/js/site.js | 4 + .../VolunterSite.WebUI/wwwroot/js/site.min.js | 0 77 files changed, 2051 insertions(+) create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.Designer.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Migrations/VolunteerSiteDbContextModelSnapshot.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/VolunteerSite.Data.csproj create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/ErrorViewModel.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/GroupMember.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/JobListing.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/Organization.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/Volunteer.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/Models/VolunteerGroup.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Domain/VolunteerSite.Domain.csproj create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Controllers/HomeController.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Models/ErrorViewModel.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Program.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Properties/launchSettings.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Index.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Privacy.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/Error.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_Layout.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewImports.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewStart.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/VolunteerSite.WebUI.csproj create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.Development.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/css/site.css create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/favicon.ico create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/js/site.js create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Controllers/HomeController.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Models/ErrorViewModel.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Program.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Properties/launchSettings.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Startup.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Index.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Privacy.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/Error.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_CookieConsentPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_Layout.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_ValidationScriptsPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewImports.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewStart.cshtml create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/VolunteerSite.WebUI2.csproj create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.Development.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.json create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/css/site.css create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/favicon.ico create mode 100644 VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/js/site.js create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI.sln create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Controllers/HomeController.cs create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Models/ErrorViewModel.cs create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Program.cs create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Properties/launchSettings.json create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Startup.cs create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/About.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Contact.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Index.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Privacy.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/Error.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_Layout.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewImports.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewStart.cshtml create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/VolunterSite.WebUI.csproj create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/appsettings.Development.json create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/appsettings.json create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.css create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.min.css create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/favicon.ico create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner1.svg create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner2.svg create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner3.svg create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.js create mode 100644 VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.min.js diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs new file mode 100644 index 0000000..051f081 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs @@ -0,0 +1,19 @@ +using Microsoft.EntityFrameworkCore; +using VolunteerSite.Domain.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace VolunteerSite.Data.Context +{ + public class VolunteerSiteDbContext : DbContext + { + public VolunteerSiteDbContext(DbContextOptions options): base(options) { } + + public DbSet Volunteers { get; set; } + public DbSet VolunteerGroups { get; set; } + public DbSet Organizations { get; set; } + public DbSet JobListings { get; set; } + public DbSet GroupMembers { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.Designer.cs b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.Designer.cs new file mode 100644 index 0000000..d5218b7 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.Designer.cs @@ -0,0 +1,168 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using VolunteerSite.Data.Context; + +namespace VolunteerSite.Data.Migrations +{ + [DbContext(typeof(VolunteerSiteDbContext))] + [Migration("20190204080041_initial")] + partial class initial + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.2.1-servicing-10028") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("VolunteerSite.Domain.Models.GroupMember", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Email"); + + b.Property("FirstName"); + + b.Property("LastName"); + + b.Property("PhoneNumber"); + + b.Property("TotalHours"); + + b.Property("VolunteerGroupId"); + + b.Property("VolunteerGroupId1"); + + b.HasKey("Id"); + + b.HasIndex("VolunteerGroupId1"); + + b.ToTable("GroupMembers"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.JobListing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Address"); + + b.Property("City"); + + b.Property("Date"); + + b.Property("Description"); + + b.Property("OrganizationId"); + + b.Property("OrganizationId1"); + + b.Property("PositionsAvailable"); + + b.Property("State"); + + b.Property("TypeOfJob"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId1"); + + b.ToTable("JobListings"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.Organization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Address"); + + b.Property("City"); + + b.Property("CompanyName"); + + b.Property("Email"); + + b.Property("PhoneNumber"); + + b.Property("State"); + + b.HasKey("Id"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.Volunteer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Email"); + + b.Property("FirstName"); + + b.Property("LastName"); + + b.Property("PhoneNumber"); + + b.Property("SkillsAndExperience"); + + b.HasKey("Id"); + + b.ToTable("Volunteers"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.VolunteerGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("GroupName"); + + b.Property("GroupOwnerId"); + + b.Property("GroupOwnerId1"); + + b.HasKey("Id"); + + b.HasIndex("GroupOwnerId1"); + + b.ToTable("VolunteerGroups"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.GroupMember", b => + { + b.HasOne("VolunteerSite.Domain.Models.VolunteerGroup", "VolunteerGroup") + .WithMany("GroupMembers") + .HasForeignKey("VolunteerGroupId1"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.JobListing", b => + { + b.HasOne("VolunteerSite.Domain.Models.Organization", "Organization") + .WithMany("JobListings") + .HasForeignKey("OrganizationId1"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.VolunteerGroup", b => + { + b.HasOne("VolunteerSite.Domain.Models.Volunteer", "GroupOwner") + .WithMany("VolunteerGroups") + .HasForeignKey("GroupOwnerId1"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.cs b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.cs new file mode 100644 index 0000000..3bee4d1 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/20190204080041_initial.cs @@ -0,0 +1,153 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace VolunteerSite.Data.Migrations +{ + public partial class initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Organizations", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(nullable: true), + Address = table.Column(nullable: true), + City = table.Column(nullable: true), + State = table.Column(nullable: true), + Email = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Organizations", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Volunteers", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + FirstName = table.Column(nullable: true), + LastName = table.Column(nullable: true), + Email = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true), + SkillsAndExperience = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Volunteers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "JobListings", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + Address = table.Column(nullable: true), + City = table.Column(nullable: true), + State = table.Column(nullable: true), + PositionsAvailable = table.Column(nullable: false), + Description = table.Column(nullable: true), + TypeOfJob = table.Column(nullable: true), + Date = table.Column(nullable: false), + OrganizationId = table.Column(nullable: true), + OrganizationId1 = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_JobListings", x => x.Id); + table.ForeignKey( + name: "FK_JobListings_Organizations_OrganizationId1", + column: x => x.OrganizationId1, + principalTable: "Organizations", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "VolunteerGroups", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + GroupName = table.Column(nullable: true), + GroupOwnerId = table.Column(nullable: true), + GroupOwnerId1 = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_VolunteerGroups", x => x.Id); + table.ForeignKey( + name: "FK_VolunteerGroups_Volunteers_GroupOwnerId1", + column: x => x.GroupOwnerId1, + principalTable: "Volunteers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "GroupMembers", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + FirstName = table.Column(nullable: true), + LastName = table.Column(nullable: true), + Email = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true), + TotalHours = table.Column(nullable: false), + VolunteerGroupId = table.Column(nullable: true), + VolunteerGroupId1 = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_GroupMembers", x => x.Id); + table.ForeignKey( + name: "FK_GroupMembers_VolunteerGroups_VolunteerGroupId1", + column: x => x.VolunteerGroupId1, + principalTable: "VolunteerGroups", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_GroupMembers_VolunteerGroupId1", + table: "GroupMembers", + column: "VolunteerGroupId1"); + + migrationBuilder.CreateIndex( + name: "IX_JobListings_OrganizationId1", + table: "JobListings", + column: "OrganizationId1"); + + migrationBuilder.CreateIndex( + name: "IX_VolunteerGroups_GroupOwnerId1", + table: "VolunteerGroups", + column: "GroupOwnerId1"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "GroupMembers"); + + migrationBuilder.DropTable( + name: "JobListings"); + + migrationBuilder.DropTable( + name: "VolunteerGroups"); + + migrationBuilder.DropTable( + name: "Organizations"); + + migrationBuilder.DropTable( + name: "Volunteers"); + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Migrations/VolunteerSiteDbContextModelSnapshot.cs b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/VolunteerSiteDbContextModelSnapshot.cs new file mode 100644 index 0000000..504fb09 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Migrations/VolunteerSiteDbContextModelSnapshot.cs @@ -0,0 +1,166 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using VolunteerSite.Data.Context; + +namespace VolunteerSite.Data.Migrations +{ + [DbContext(typeof(VolunteerSiteDbContext))] + partial class VolunteerSiteDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.2.1-servicing-10028") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("VolunteerSite.Domain.Models.GroupMember", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Email"); + + b.Property("FirstName"); + + b.Property("LastName"); + + b.Property("PhoneNumber"); + + b.Property("TotalHours"); + + b.Property("VolunteerGroupId"); + + b.Property("VolunteerGroupId1"); + + b.HasKey("Id"); + + b.HasIndex("VolunteerGroupId1"); + + b.ToTable("GroupMembers"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.JobListing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Address"); + + b.Property("City"); + + b.Property("Date"); + + b.Property("Description"); + + b.Property("OrganizationId"); + + b.Property("OrganizationId1"); + + b.Property("PositionsAvailable"); + + b.Property("State"); + + b.Property("TypeOfJob"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId1"); + + b.ToTable("JobListings"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.Organization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Address"); + + b.Property("City"); + + b.Property("CompanyName"); + + b.Property("Email"); + + b.Property("PhoneNumber"); + + b.Property("State"); + + b.HasKey("Id"); + + b.ToTable("Organizations"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.Volunteer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Email"); + + b.Property("FirstName"); + + b.Property("LastName"); + + b.Property("PhoneNumber"); + + b.Property("SkillsAndExperience"); + + b.HasKey("Id"); + + b.ToTable("Volunteers"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.VolunteerGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("GroupName"); + + b.Property("GroupOwnerId"); + + b.Property("GroupOwnerId1"); + + b.HasKey("Id"); + + b.HasIndex("GroupOwnerId1"); + + b.ToTable("VolunteerGroups"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.GroupMember", b => + { + b.HasOne("VolunteerSite.Domain.Models.VolunteerGroup", "VolunteerGroup") + .WithMany("GroupMembers") + .HasForeignKey("VolunteerGroupId1"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.JobListing", b => + { + b.HasOne("VolunteerSite.Domain.Models.Organization", "Organization") + .WithMany("JobListings") + .HasForeignKey("OrganizationId1"); + }); + + modelBuilder.Entity("VolunteerSite.Domain.Models.VolunteerGroup", b => + { + b.HasOne("VolunteerSite.Domain.Models.Volunteer", "GroupOwner") + .WithMany("VolunteerGroups") + .HasForeignKey("GroupOwnerId1"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/VolunteerSite.Data.csproj b/VolunterSite.WebUI/VolunteerSite.Data/VolunteerSite.Data.csproj new file mode 100644 index 0000000..48e0d90 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/VolunteerSite.Data.csproj @@ -0,0 +1,20 @@ + + + + netcoreapp2.2 + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/ErrorViewModel.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/ErrorViewModel.cs new file mode 100644 index 0000000..8167476 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/ErrorViewModel.cs @@ -0,0 +1,11 @@ +using System; + +namespace VolunterSite.WebUI.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/GroupMember.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/GroupMember.cs new file mode 100644 index 0000000..748aa57 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/GroupMember.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace VolunteerSite.Domain.Models +{ + public class GroupMember + { + public int Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + public string PhoneNumber { get; set; } + public int TotalHours { get; set; } + + public string VolunteerGroupId { get; set; } + public VolunteerGroup VolunteerGroup { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/JobListing.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/JobListing.cs new file mode 100644 index 0000000..915d6e1 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/JobListing.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace VolunteerSite.Domain.Models +{ + public class JobListing + { + public int Id { get; set; } + public string Address { get; set; } + public string City { get; set; } + public string State { get; set; } + public int PositionsAvailable { get; set; } + public string Description { get; set; } + public string TypeOfJob { get; set; } + public DateTime Date { get; set; } + + public string OrganizationId { get; set; } + public Organization Organization { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/Organization.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/Organization.cs new file mode 100644 index 0000000..448779a --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/Organization.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunterSite.WebUI.Models; + +namespace VolunteerSite.Domain.Models +{ + public class Organization + { + public int Id { get; set; } + public string CompanyName { get; set; } + public string Address { get; set; } + public string City { get; set; } + public string State { get; set; } + public string Email { get; set; } + public string PhoneNumber { get; set; } + + public IEnumerable JobListings { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/Volunteer.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/Volunteer.cs new file mode 100644 index 0000000..bda03d0 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/Volunteer.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace VolunteerSite.Domain.Models +{ + public class Volunteer + { + public int Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + public string PhoneNumber { get; set; } + public string SkillsAndExperience { get; set; } + + // Navigation Collection + public IEnumerable VolunteerGroups { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/Models/VolunteerGroup.cs b/VolunterSite.WebUI/VolunteerSite.Domain/Models/VolunteerGroup.cs new file mode 100644 index 0000000..7fddf02 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/Models/VolunteerGroup.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace VolunteerSite.Domain.Models +{ + public class VolunteerGroup + { + public int Id { get; set; } + public string GroupName { get; set; } + + public string GroupOwnerId { get; set; } + public Volunteer GroupOwner { get; set; } + + public IEnumerable GroupMembers { get; set; } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Domain/VolunteerSite.Domain.csproj b/VolunterSite.WebUI/VolunteerSite.Domain/VolunteerSite.Domain.csproj new file mode 100644 index 0000000..dbe0552 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Domain/VolunteerSite.Domain.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.2 + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Controllers/HomeController.cs b/VolunterSite.WebUI/VolunteerSite.WebUI/Controllers/HomeController.cs new file mode 100644 index 0000000..092f3c8 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Controllers/HomeController.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using VolunteerSite.WebUI.Models; + +namespace VolunteerSite.WebUI.Controllers +{ + public class HomeController : Controller + { + public IActionResult Index() + { + 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 }); + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Models/ErrorViewModel.cs b/VolunterSite.WebUI/VolunteerSite.WebUI/Models/ErrorViewModel.cs new file mode 100644 index 0000000..2205216 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Models/ErrorViewModel.cs @@ -0,0 +1,11 @@ +using System; + +namespace VolunteerSite.WebUI.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Program.cs b/VolunterSite.WebUI/VolunteerSite.WebUI/Program.cs new file mode 100644 index 0000000..e0b7d22 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace VolunteerSite.WebUI +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Properties/launchSettings.json b/VolunterSite.WebUI/VolunteerSite.WebUI/Properties/launchSettings.json new file mode 100644 index 0000000..2b54a80 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:55530", + "sslPort": 44312 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "VolunteerSite.WebUI": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs b/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs new file mode 100644 index 0000000..35de0cd --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using VolunteerSite.Data.Context; + +namespace VolunteerSite.WebUI +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + // bad way of adding connection string + //TODO: fix later + var connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=volunteersite;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"; + services.AddDbContext(options => options.UseSqlServer(connectionString)); + + services.Configure(options => + { + // This lambda determines whether user consent for non-essential cookies is needed for a given request. + options.CheckConsentNeeded = context => true; + options.MinimumSameSitePolicy = SameSiteMode.None; + }); + + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseCookiePolicy(); + + app.UseMvc(routes => + { + routes.MapRoute( + name: "default", + template: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Index.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Index.cshtml new file mode 100644 index 0000000..d2d19bd --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Welcome

+

Learn about building Web apps with ASP.NET Core.

+
diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Privacy.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..af4fb19 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/Error.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/Error.cshtml new file mode 100644 index 0000000..a1e0478 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/Error.cshtml @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml new file mode 100644 index 0000000..a535ea4 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml @@ -0,0 +1,25 @@ +@using Microsoft.AspNetCore.Http.Features + +@{ + var consentFeature = Context.Features.Get(); + var showBanner = !consentFeature?.CanTrack ?? false; + var cookieString = consentFeature?.CreateConsentCookie(); +} + +@if (showBanner) +{ + + +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_Layout.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..d9a0579 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_Layout.cshtml @@ -0,0 +1,77 @@ + + + + + + @ViewData["Title"] - VolunteerSite.WebUI + + + + + + + + + + +
+ +
+
+ +
+ @RenderBody() +
+
+ +
+
+ © 2019 - VolunteerSite.WebUI - Privacy +
+
+ + + + + + + + + + + + @RenderSection("Scripts", required: false) + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..3c0e077 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewImports.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewImports.cshtml new file mode 100644 index 0000000..94c63b5 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using VolunteerSite.WebUI +@using VolunteerSite.WebUI.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewStart.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/VolunteerSite.WebUI.csproj b/VolunterSite.WebUI/VolunteerSite.WebUI/VolunteerSite.WebUI.csproj new file mode 100644 index 0000000..cb9cfff --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/VolunteerSite.WebUI.csproj @@ -0,0 +1,20 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + + + + + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.Development.json b/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.json b/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/css/site.css b/VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/css/site.css new file mode 100644 index 0000000..c486131 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/css/site.css @@ -0,0 +1,56 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + font-size: 14px; +} +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + position: relative; + min-height: 100%; +} + +body { + /* Margin bottom by footer height */ + margin-bottom: 60px; +} +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + /* Set the fixed height of the footer here */ + height: 60px; + line-height: 60px; /* Vertically center the text there */ +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/favicon.ico b/VolunterSite.WebUI/VolunteerSite.WebUI/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a3a799985c43bc7309d701b2cad129023377dc71 GIT binary patch literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$QFr9nPg(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadT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 100644 index 0000000..07d96c0 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace VolunteerSite.WebUI2 +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Properties/launchSettings.json b/VolunterSite.WebUI/VolunteerSite.WebUI2/Properties/launchSettings.json new file mode 100644 index 0000000..5168021 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:55509", + "sslPort": 44376 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "VolunteerSite.WebUI2": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Startup.cs b/VolunterSite.WebUI/VolunteerSite.WebUI2/Startup.cs new file mode 100644 index 0000000..1718a40 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Startup.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace VolunteerSite.WebUI2 +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.Configure(options => + { + // This lambda determines whether user consent for non-essential cookies is needed for a given request. + options.CheckConsentNeeded = context => true; + options.MinimumSameSitePolicy = SameSiteMode.None; + }); + + + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseCookiePolicy(); + + app.UseMvc(routes => + { + routes.MapRoute( + name: "default", + template: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Index.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Index.cshtml new file mode 100644 index 0000000..d2d19bd --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Welcome

+

Learn about building Web apps with ASP.NET Core.

+
diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Privacy.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..af4fb19 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/Error.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/Error.cshtml new file mode 100644 index 0000000..a1e0478 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/Error.cshtml @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_CookieConsentPartial.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_CookieConsentPartial.cshtml new file mode 100644 index 0000000..a535ea4 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_CookieConsentPartial.cshtml @@ -0,0 +1,25 @@ +@using Microsoft.AspNetCore.Http.Features + +@{ + var consentFeature = Context.Features.Get(); + var showBanner = !consentFeature?.CanTrack ?? false; + var cookieString = consentFeature?.CreateConsentCookie(); +} + +@if (showBanner) +{ + + +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_Layout.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..5075eab --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_Layout.cshtml @@ -0,0 +1,77 @@ + + + + + + @ViewData["Title"] - VolunteerSite.WebUI2 + + + + + + + + + + +
+ +
+
+ +
+ @RenderBody() +
+
+ +
+
+ © 2019 - VolunteerSite.WebUI2 - Privacy +
+
+ + + + + + + + + + + + @RenderSection("Scripts", required: false) + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_ValidationScriptsPartial.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..3c0e077 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewImports.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewImports.cshtml new file mode 100644 index 0000000..fe7cfb0 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using VolunteerSite.WebUI2 +@using VolunteerSite.WebUI2.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewStart.cshtml b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/VolunteerSite.WebUI2.csproj b/VolunterSite.WebUI/VolunteerSite.WebUI2/VolunteerSite.WebUI2.csproj new file mode 100644 index 0000000..8b11822 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/VolunteerSite.WebUI2.csproj @@ -0,0 +1,14 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + + diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.Development.json b/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.json b/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/css/site.css b/VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/css/site.css new file mode 100644 index 0000000..c486131 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/css/site.css @@ -0,0 +1,56 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + font-size: 14px; +} +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +/* Sticky footer styles +-------------------------------------------------- */ +html { + position: relative; + min-height: 100%; +} + +body { + /* Margin bottom by footer height */ + margin-bottom: 60px; +} +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + /* Set the fixed height of the footer here */ + height: 60px; + line-height: 60px; /* Vertically center the text there */ +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/favicon.ico b/VolunterSite.WebUI/VolunteerSite.WebUI2/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a3a799985c43bc7309d701b2cad129023377dc71 GIT binary patch literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$QFr9nPg(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$FXNPolgyr1XGt$^lFPF}rmBF5rj1Kh5%dforrP8W}_qJL$2qMBS-#%-|s#BPZBSETsn_EBYcr(W5dq( z@f%}C|iN7)YN`^)h7R?Cg}Do*w-!zwZb9=BMp%Wsh@nb22hA zA{`wa8Q;yz6S)zfo%sl08^GF`9csI9BlGnEy#0^Y3b);M+n<(}6jziM7nhe57a1rj zC@(2ISYBL^UtWChKzVWgf%4LW2Tqg_^7jMw`C$KvU+mcakFjV(BGAW9g%CzSyM;Df z143=mq0oxaK-H;o>F3~zJ<(3-j&?|QBn)WJfP#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kZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_ !string.IsNullOrEmpty(RequestId); + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Program.cs b/VolunterSite.WebUI/VolunterSite.WebUI/Program.cs new file mode 100644 index 0000000..13daccf --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace VolunterSite.WebUI +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Properties/launchSettings.json b/VolunterSite.WebUI/VolunterSite.WebUI/Properties/launchSettings.json new file mode 100644 index 0000000..e92f707 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:60571", + "sslPort": 44345 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "VolunterSite.WebUI": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Startup.cs b/VolunterSite.WebUI/VolunterSite.WebUI/Startup.cs new file mode 100644 index 0000000..b7fb12e --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Startup.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace VolunterSite.WebUI +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + // bad way of adding connection string + //TODO: fix later + var connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=master;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"; + services.AddDbContext + + services.Configure(options => + { + // This lambda determines whether user consent for non-essential cookies is needed for a given request. + options.CheckConsentNeeded = context => true; + options.MinimumSameSitePolicy = SameSiteMode.None; + }); + + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseCookiePolicy(); + + app.UseMvc(routes => + { + routes.MapRoute( + name: "default", + template: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/About.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/About.cshtml new file mode 100644 index 0000000..3674e37 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/About.cshtml @@ -0,0 +1,7 @@ +@{ + ViewData["Title"] = "About"; +} +

@ViewData["Title"]

+

@ViewData["Message"]

+ +

Use this area to provide additional information.

diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Contact.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Contact.cshtml new file mode 100644 index 0000000..a11a186 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Contact.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "Contact"; +} +

@ViewData["Title"]

+

@ViewData["Message"]

+ +
+ One Microsoft Way
+ Redmond, WA 98052-6399
+ P: + 425.555.0100 +
+ +
+ Support: Support@example.com
+ Marketing: Marketing@example.com +
diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Index.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Index.cshtml new file mode 100644 index 0000000..f42d2a0 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Index.cshtml @@ -0,0 +1,94 @@ +@{ + ViewData["Title"] = "Home Page"; +} + + + + diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Privacy.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..7bd3861 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/Error.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/Error.cshtml new file mode 100644 index 0000000..ec2ea6b --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/Error.cshtml @@ -0,0 +1,22 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. +

diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml new file mode 100644 index 0000000..bbfbb09 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_CookieConsentPartial.cshtml @@ -0,0 +1,41 @@ +@using Microsoft.AspNetCore.Http.Features + +@{ + var consentFeature = Context.Features.Get(); + var showBanner = !consentFeature?.CanTrack ?? false; + var cookieString = consentFeature?.CreateConsentCookie(); +} + +@if (showBanner) +{ + + +} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_Layout.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..43e56e5 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_Layout.cshtml @@ -0,0 +1,74 @@ + + + + + + @ViewData["Title"] - VolunterSite.WebUI + + + + + + + + + + + + + + + +
+ @RenderBody() +
+
+

© 2019 - VolunterSite.WebUI

+
+
+ + + + + + + + + + + + + @RenderSection("Scripts", required: false) + + diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..2a9241f --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewImports.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewImports.cshtml new file mode 100644 index 0000000..8c97aa0 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using VolunterSite.WebUI +@using VolunterSite.WebUI.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewStart.cshtml b/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/VolunterSite.WebUI.csproj b/VolunterSite.WebUI/VolunterSite.WebUI/VolunterSite.WebUI.csproj new file mode 100644 index 0000000..efb8edb --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/VolunterSite.WebUI.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp2.1 + + + + + + + + diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.Development.json b/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.json b/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.css b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.css new file mode 100644 index 0000000..e89c781 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.css @@ -0,0 +1,37 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\ +for details on configuring this project to bundle and minify static web assets. */ +body { + padding-top: 50px; + padding-bottom: 20px; +} + +/* Wrapping element */ +/* Set some basic padding to keep content from hitting the edges */ +.body-content { + padding-left: 15px; + padding-right: 15px; +} + +/* Carousel */ +.carousel-caption p { + font-size: 20px; + line-height: 1.4; +} + +/* Make .svg files in the carousel display properly in older browsers */ +.carousel-inner .item img[src$=".svg"] { + width: 100%; +} + +/* QR code generator */ +#qrCode { + margin: 15px; +} + +/* Hide/rearrange for smaller screens */ +@media screen and (max-width: 767px) { + /* Hide captions */ + .carousel-caption { + display: none; + } +} diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.min.css b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.min.css new file mode 100644 index 0000000..5e93e30 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/css/site.min.css @@ -0,0 +1 @@ +body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}} \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/favicon.ico b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a3a799985c43bc7309d701b2cad129023377dc71 GIT binary patch literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$QFr9nPg(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$F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7w~K%_E<8`zS;V- zKTho*>;UQQul^1GT^HCt@I-q?)&4!QDgBndn?3sNKYKCQFU4LGKJ$n@Je$&w9@E$X z^p@iJ(v&`1(tq~1zc>0Vow-KR&vm!GUzT?Eqgnc)leZ9p)-Z*C!zqb=-$XG0 z^!8RfuQs5s>Q~qcz92(a_Q+KH?C*vCTr~UdTiR`JGuNH8v(J|FTiSEcPrBpmHRtmd zI2Jng0J=bXK);YY^rM?jzn?~X-Pe`GbAy{D)Y6D&1GY-EBcy%Bq?bKh?A>DD9DD!p z?{q02wno2sraGUkZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_ \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner2.svg b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner2.svg new file mode 100644 index 0000000..9679c60 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner3.svg b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner3.svg new file mode 100644 index 0000000..38b3d7c --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/images/banner3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.js b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.js new file mode 100644 index 0000000..ac49c18 --- /dev/null +++ b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.js @@ -0,0 +1,4 @@ +// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +// for details on configuring this project to bundle and minify static web assets. + +// Write your JavaScript code. diff --git a/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.min.js b/VolunterSite.WebUI/VolunterSite.WebUI/wwwroot/js/site.min.js new file mode 100644 index 0000000..e69de29 From 5b5cf4c3a0c2608b7d874f7b0d16dbaf24777015 Mon Sep 17 00:00:00 2001 From: Michael Rich Date: Mon, 25 Feb 2019 00:24:48 -0600 Subject: [PATCH 2/3] moved connection string from startup to DbContext and added interfaces for models --- .../Context/VolunteerSiteDbContext.cs | 13 ++++++++++ .../Interfaces/IGroupMemberRepository.cs | 23 ++++++++++++++++++ .../IJobListingRepository - Copy.cs | 24 +++++++++++++++++++ .../Interfaces/IOrganizationRepository.cs | 22 +++++++++++++++++ .../Interfaces/IVolunteerGroupRepository.cs | 22 +++++++++++++++++ .../Interfaces/IVolunteerRepository.cs | 22 +++++++++++++++++ .../VolunteerSite.WebUI/Startup.cs | 5 ---- 7 files changed, 126 insertions(+), 5 deletions(-) create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IJobListingRepository - Copy.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IOrganizationRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerGroupRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerRepository.cs diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs index 051f081..4ac44fc 100644 --- a/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs +++ b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs @@ -15,5 +15,18 @@ public VolunteerSiteDbContext(DbContextOptions options): public DbSet Organizations { get; set; } public DbSet JobListings { get; set; } public DbSet GroupMembers { get; set; } + + // Setting up the provider (SQL Server) and location of the Database + protected override void OnConfiguring(DbContextOptionsBuilder optionBuilder) + { + // bad way of providing the connection string + optionBuilder.UseSqlServer(@"Server=(localdb)\MSSQLLocalDB;Database=volunteersite;Trusted_Connection=True"); + } + + //Seeding - populate db with initial data + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + } } } diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs new file mode 100644 index 0000000..8a126a6 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Interfaces +{ + public interface IGroupMemberRepository + { + //read + GroupMember GetById(int groupMemberId); + ICollection GetByGroupId(int groupId); + + //create + GroupMember Create(GroupMember newGroupMember); + + //Update + GroupMember Update(GroupMember UpdatedGroupMember); + + //Delete + bool DeleteById(int groupMemberId); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IJobListingRepository - Copy.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IJobListingRepository - Copy.cs new file mode 100644 index 0000000..07c931a --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IJobListingRepository - Copy.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Interfaces +{ + interface IJobListingRepository + { + //Read + JobListing GetById(int jobListingId); + ICollection GetByOrganizationId(string organizationId); + ICollection GetByTypeOfJob(string typeOfJob); + + // Create + JobListing Create(JobListing newJobListing); + + //Update + JobListing Update(JobListing updatedJobListing); + + //Delete + bool DeleteById(int jobListingId); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IOrganizationRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IOrganizationRepository.cs new file mode 100644 index 0000000..7c9f91a --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IOrganizationRepository.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Interfaces +{ + interface IOrganizationRepository + { + //Read + Organization GetById(int organizationId); + + // Create + Organization Create(Organization newOrganization); + + //Update + Organization Update(Organization updatedOrganization); + + //Delete + bool DeleteById(int organizationId); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerGroupRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerGroupRepository.cs new file mode 100644 index 0000000..7b4484d --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerGroupRepository.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Interfaces +{ + interface IVolunteerGroupRepository + { + //Read + VolunteerGroup GetById(int volunteerGroupId); + + // Create + VolunteerGroup Create(VolunteerGroup newVolunteerGroup); + + //Update + VolunteerGroup Update(VolunteerGroup updatedVolunteerGroup); + + //Delete + bool DeleteById(int volunteerGroupId); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerRepository.cs new file mode 100644 index 0000000..f9f759f --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IVolunteerRepository.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Interfaces +{ + interface IVolunteerRepository + { + //Read + Volunteer GetById(int volunteerId); + + // Create + Volunteer Create(Volunteer newVolunteer); + + //Update + Volunteer Update(Volunteer updatedVolunteer); + + //Delete + bool DeleteById(int volunteerId); + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs b/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs index 35de0cd..17bcb6c 100644 --- a/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs +++ b/VolunterSite.WebUI/VolunteerSite.WebUI/Startup.cs @@ -26,11 +26,6 @@ public Startup(IConfiguration configuration) // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - // bad way of adding connection string - //TODO: fix later - var connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=volunteersite;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"; - services.AddDbContext(options => options.UseSqlServer(connectionString)); - services.Configure(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. From 509d7139f21df9e2d3a3d3b884ec2e58db46a600 Mon Sep 17 00:00:00 2001 From: Michael Rich Date: Mon, 25 Feb 2019 16:31:29 -0600 Subject: [PATCH 3/3] Created Mock and EFCore implementation and moved connection string to DbContext --- .../Context/VolunteerSiteDbContext.cs | 8 -- .../EFCore/EFCoreGroupMemberRepository.cs | 69 +++++++++++++++++ .../EFCore/EFCoreJobListingRepository.cs | 77 +++++++++++++++++++ .../EFCore/EFCoreOrganizationRepository.cs | 61 +++++++++++++++ .../Implementation/EFCore/EFCoreVolunteer.cs | 61 +++++++++++++++ .../EFCore/EFCoreVolunteerGroup.cs | 61 +++++++++++++++ .../Mock/MockGroupMemberRepository.cs | 50 ++++++++++++ .../Mock/MockJobListingRepository.cs | 55 +++++++++++++ .../Mock/MockOrganizationRepository.cs | 45 +++++++++++ .../Mock/MockVolunteerGroupRepository.cs | 45 +++++++++++ .../Mock/MockVolunteerRepository.cs | 45 +++++++++++ .../Interfaces/IGroupMemberRepository.cs | 2 +- 12 files changed, 570 insertions(+), 9 deletions(-) create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreGroupMemberRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreJobListingRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreOrganizationRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteer.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteerGroup.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockGroupMemberRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockJobListingRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockOrganizationRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerGroupRepository.cs create mode 100644 VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerRepository.cs diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs index 4ac44fc..d213562 100644 --- a/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs +++ b/VolunterSite.WebUI/VolunteerSite.Data/Context/VolunteerSiteDbContext.cs @@ -8,8 +8,6 @@ namespace VolunteerSite.Data.Context { public class VolunteerSiteDbContext : DbContext { - public VolunteerSiteDbContext(DbContextOptions options): base(options) { } - public DbSet Volunteers { get; set; } public DbSet VolunteerGroups { get; set; } public DbSet Organizations { get; set; } @@ -22,11 +20,5 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionBuilder) // bad way of providing the connection string optionBuilder.UseSqlServer(@"Server=(localdb)\MSSQLLocalDB;Database=volunteersite;Trusted_Connection=True"); } - - //Seeding - populate db with initial data - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - } } } diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreGroupMemberRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreGroupMemberRepository.cs new file mode 100644 index 0000000..a46ae92 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreGroupMemberRepository.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Context; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.EFCore +{ + class EFCoreGroupMemberRepository : IGroupMemberRepository + { + public GroupMember Create(GroupMember newGroupMember) + { + using (var context = new VolunteerSiteDbContext()) + { + context.GroupMembers.Add(newGroupMember); + context.SaveChanges(); + + return newGroupMember; + } + } + + public bool DeleteById(int groupMemberId) + { + using (var context = new VolunteerSiteDbContext()) + { + var groupMemberToBeDeleted = GetById(groupMemberId); + context.Remove(groupMemberToBeDeleted); + context.SaveChanges(); + + if (GetById(groupMemberId) == null) + { + return true; + } + + return false; + } + } + + public ICollection GetByGroupId(string volunteerGroupId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.GroupMembers.Where(m => m.VolunteerGroupId == volunteerGroupId).ToList(); + } + } + + public GroupMember GetById(int groupMemberId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.GroupMembers.Single(m => m.Id == groupMemberId); + } + } + + public GroupMember Update(GroupMember updatedGroupMember) + { + using (var context = new VolunteerSiteDbContext()) + { + var existingGroupMember = GetById(updatedGroupMember.Id); + context.Entry(existingGroupMember).CurrentValues.SetValues(updatedGroupMember); + context.SaveChanges(); + + return existingGroupMember; + } + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreJobListingRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreJobListingRepository.cs new file mode 100644 index 0000000..ddacb98 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreJobListingRepository.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Context; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.EFCore +{ + class EFCoreJobListingRepository : IJobListingRepository + { + public JobListing Create(JobListing newJobListing) + { + using (var context = new VolunteerSiteDbContext()) + { + context.JobListings.Add(newJobListing); + context.SaveChanges(); + + return newJobListing; + } + } + + public bool DeleteById(int jobListingId) + { + using (var context = new VolunteerSiteDbContext()) + { + var jobListingToBeDeleted = GetById(jobListingId); + context.Remove(jobListingToBeDeleted); + context.SaveChanges(); + + if (GetById(jobListingId) == null) + { + return true; + } + + return false; + } + } + + public JobListing GetById(int jobListingId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.JobListings.Single(j => j.Id == jobListingId); + } + } + + public ICollection GetByOrganizationId(string organizationId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.JobListings.Where(j => j.OrganizationId == organizationId).ToList(); + } + } + + public ICollection GetByTypeOfJob(string typeOfJob) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.JobListings.Where(m => m.TypeOfJob == typeOfJob).ToList(); + } + } + + public JobListing Update(JobListing updatedJobListing) + { + using (var context = new VolunteerSiteDbContext()) + { + var existingJobListing = GetById(updatedJobListing.Id); + context.Entry(existingJobListing).CurrentValues.SetValues(updatedJobListing); + context.SaveChanges(); + + return existingJobListing; + } + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreOrganizationRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreOrganizationRepository.cs new file mode 100644 index 0000000..ba42ce0 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreOrganizationRepository.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Context; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.EFCore +{ + class EFCoreOrganizationRepository : IOrganizationRepository + { + public Organization Create(Organization newOrganization) + { + using (var context = new VolunteerSiteDbContext()) + { + context.Organizations.Add(newOrganization); + context.SaveChanges(); + + return newOrganization; + } + } + + public bool DeleteById(int organizationId) + { + using (var context = new VolunteerSiteDbContext()) + { + var organizationToBeDeleted = GetById(organizationId); + context.Remove(organizationToBeDeleted); + context.SaveChanges(); + + if (GetById(organizationId) == null) + { + return true; + } + + return false; + } + } + + public Organization GetById(int organizationId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.Organizations.Single(o => o.Id == organizationId); + } + } + + public Organization Update(Organization updatedOrganization) + { + using (var context = new VolunteerSiteDbContext()) + { + var existingOrganization = GetById(updatedOrganization.Id); + context.Entry(existingOrganization).CurrentValues.SetValues(updatedOrganization); + context.SaveChanges(); + + return existingOrganization; + } + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteer.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteer.cs new file mode 100644 index 0000000..fdc09b6 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteer.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Context; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.EFCore +{ + class EFCoreVolunteer : IVolunteerRepository + { + public Volunteer Create(Volunteer newVolunteer) + { + using (var context = new VolunteerSiteDbContext()) + { + context.Volunteers.Add(newVolunteer); + context.SaveChanges(); + + return newVolunteer; + } + } + + public bool DeleteById(int volunteerId) + { + using (var context = new VolunteerSiteDbContext()) + { + var volunteerToBeDeleted = GetById(volunteerId); + context.Remove(volunteerToBeDeleted); + context.SaveChanges(); + + if (GetById(volunteerId) == null) + { + return true; + } + + return false; + } + } + + public Volunteer GetById(int volunteerId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.Volunteers.Single(v => v.Id == volunteerId); + } + } + + public Volunteer Update(Volunteer updatedVolunteer) + { + using (var context = new VolunteerSiteDbContext()) + { + var existingVolunteer = GetById(updatedVolunteer.Id); + context.Entry(existingVolunteer).CurrentValues.SetValues(updatedVolunteer); + context.SaveChanges(); + + return existingVolunteer; + } + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteerGroup.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteerGroup.cs new file mode 100644 index 0000000..1507b0e --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/EFCore/EFCoreVolunteerGroup.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Context; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.EFCore +{ + class EFCoreVolunteerGroup : IVolunteerGroupRepository + { + public VolunteerGroup Create(VolunteerGroup newVolunteerGroup) + { + using (var context = new VolunteerSiteDbContext()) + { + context.VolunteerGroups.Add(newVolunteerGroup); + context.SaveChanges(); + + return newVolunteerGroup; + } + } + + public bool DeleteById(int volunteerGroupId) + { + using (var context = new VolunteerSiteDbContext()) + { + var volunteerGroupToBeDeleted = GetById(volunteerGroupId); + context.Remove(volunteerGroupToBeDeleted); + context.SaveChanges(); + + if (GetById(volunteerGroupId) == null) + { + return true; + } + + return false; + } + } + + public VolunteerGroup GetById(int volunteerGroupId) + { + using (var context = new VolunteerSiteDbContext()) + { + return context.VolunteerGroups.Single(v => v.Id == volunteerGroupId); + } + } + + public VolunteerGroup Update(VolunteerGroup updatedVolunteerGroup) + { + using (var context = new VolunteerSiteDbContext()) + { + var existingVolunteerGroup = GetById(updatedVolunteerGroup.Id); + context.Entry(existingVolunteerGroup).CurrentValues.SetValues(updatedVolunteerGroup); + context.SaveChanges(); + + return existingVolunteerGroup; + } + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockGroupMemberRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockGroupMemberRepository.cs new file mode 100644 index 0000000..c35f9c5 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockGroupMemberRepository.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.Mock +{ + class MockGroupMemberRepository : IGroupMemberRepository + { + private List GroupMembers = new List() + { + + }; + + public GroupMember GetById(int groupMemberId) + { + return GroupMembers.Single(g => g.Id == groupMemberId); + } + + public GroupMember Create(GroupMember newHome) + { + newHome.Id = GroupMembers.OrderByDescending(g => g.Id).Single().Id + 1; + GroupMembers.Add(newHome); + + return newHome; + } + + public GroupMember Update(GroupMember updatedGroupMember) + { + DeleteById(updatedGroupMember.Id); // delete the existing home + GroupMembers.Add(updatedGroupMember); + + return updatedGroupMember; + } + + public bool DeleteById(int groupMemberId) + { + var GroupMember = GetById(groupMemberId); + GroupMembers.Remove(GroupMember); + return true; + } + + public ICollection GetByGroupId(int groupId) + { + throw new NotImplementedException(); + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockJobListingRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockJobListingRepository.cs new file mode 100644 index 0000000..6aef28a --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockJobListingRepository.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.Mock +{ + class MockJobListingRepository : IJobListingRepository + { + private List JobListings = new List() + { + + }; + + public JobListing GetById(int jobListingId) + { + return JobListings.Single(j => j.Id == jobListingId); + } + + public ICollection GetByOrganizationId(string organizationId) + { + return JobListings.FindAll(j => j.OrganizationId == organizationId); + } + + public ICollection GetByTypeOfJob(string typeOfJob) + { + return JobListings.FindAll(j => j.TypeOfJob == typeOfJob); + } + + public JobListing Create(JobListing newJobListing) + { + newJobListing.Id = JobListings.OrderByDescending(j => j.Id).Single().Id + 1; + JobListings.Add(newJobListing); + + return newJobListing; + } + + public JobListing Update(JobListing updatedJobListing) + { + DeleteById(updatedJobListing.Id); // delete the existing home + JobListings.Add(updatedJobListing); + + return updatedJobListing; + } + + public bool DeleteById(int jobListingId) + { + var JobListing = GetById(jobListingId); + JobListings.Remove(JobListing); + return true; + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockOrganizationRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockOrganizationRepository.cs new file mode 100644 index 0000000..7f1740c --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockOrganizationRepository.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.Mock +{ + class MockOrganizationRepository : IOrganizationRepository + { + private List Organizations = new List() + { + + }; + + public Organization Create(Organization newOrganization) + { + newOrganization.Id = Organizations.OrderByDescending(h => h.Id).Single().Id + 1; + Organizations.Add(newOrganization); + + return newOrganization; + } + + public bool DeleteById(int organizationId) + { + var organization = GetById(organizationId); + Organizations.Remove(organization); + return true; + } + + public Organization GetById(int organizationId) + { + return Organizations.Single(h => h.Id == organizationId); + } + + public Organization Update(Organization updatedOrganization) + { + DeleteById(updatedOrganization.Id); + Organizations.Add(updatedOrganization); + + return updatedOrganization; + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerGroupRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerGroupRepository.cs new file mode 100644 index 0000000..1e7b624 --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerGroupRepository.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.Mock +{ + public class MockVolunteerGroupRepository : IVolunteerGroupRepository + { + private List VolunteerGroups = new List() + { + + }; + + public VolunteerGroup Create(VolunteerGroup newVolunteerGroup) + { + newVolunteerGroup.Id = VolunteerGroups.OrderByDescending(v => v.Id).Single().Id + 1; + VolunteerGroups.Add(newVolunteerGroup); + + return newVolunteerGroup; + } + + public bool DeleteById(int volunteerGroupId) + { + var home = GetById(volunteerGroupId); + VolunteerGroups.Remove(home); + return true; + } + + public VolunteerGroup GetById(int volunteerGroupId) + { + return VolunteerGroups.Single(v => v.Id == volunteerGroupId); + } + + public VolunteerGroup Update(VolunteerGroup updatedVolunteerGroup) + { + DeleteById(updatedVolunteerGroup.Id); + VolunteerGroups.Add(updatedVolunteerGroup); + + return updatedVolunteerGroup; + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerRepository.cs new file mode 100644 index 0000000..1e893cf --- /dev/null +++ b/VolunterSite.WebUI/VolunteerSite.Data/Implementation/Mock/MockVolunteerRepository.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VolunteerSite.Data.Interfaces; +using VolunteerSite.Domain.Models; + +namespace VolunteerSite.Data.Implementation.Mock +{ + class MockVolunteerRepository : IVolunteerRepository + { + private List Volunteers = new List() + { + + }; + + public Volunteer Create(Volunteer newVolunteer) + { + newVolunteer.Id = Volunteers.OrderByDescending(h => h.Id).Single().Id + 1; + Volunteers.Add(newVolunteer); + + return newVolunteer; + } + + public bool DeleteById(int volunteerId) + { + var home = GetById(volunteerId); + Volunteers.Remove(home); + return true; + } + + public Volunteer GetById(int volunteerId) + { + return Volunteers.Single(h => h.Id == volunteerId); + } + + public Volunteer Update(Volunteer updatedVolunteer) + { + DeleteById(updatedVolunteer.Id); + Volunteers.Add(updatedVolunteer); + + return updatedVolunteer; + } + } +} diff --git a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs index 8a126a6..a5b239e 100644 --- a/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs +++ b/VolunterSite.WebUI/VolunteerSite.Data/Interfaces/IGroupMemberRepository.cs @@ -9,7 +9,7 @@ public interface IGroupMemberRepository { //read GroupMember GetById(int groupMemberId); - ICollection GetByGroupId(int groupId); + ICollection GetByGroupId(string volunteerGroupId); //create GroupMember Create(GroupMember newGroupMember);