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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file added GRS.Identity.bak
Binary file not shown.
Binary file added GRS.bak
Binary file not shown.
Binary file added GRS/.vs/GRS/v15/.suo
Binary file not shown.
Binary file added GRS/.vs/GRS/v15/sqlite3/storage.ide
Binary file not shown.
997 changes: 997 additions & 0 deletions GRS/.vs/config/applicationhost.config

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions GRS/GRS.ApplicationCore/Entities/BaseEntity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GRS.ApplicationCore.Entities
{
public class BaseEntity
{
public int Id { get; set; }
}
}
22 changes: 22 additions & 0 deletions GRS/GRS.ApplicationCore/Entities/Candidate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace GRS.ApplicationCore.Entities
{
public class Candidate : BaseEntity
{
public string FirstName { get; set; }
public string LastName { get; set; }
public List<CandidateSkill> Skills { get; set; } = new List<CandidateSkill>();

public void AddSkill(int skillId)
{
if (!Skills.Any(i => i.SkillId == skillId))
{
Skills.Add(new CandidateSkill() { SkillId = skillId });
}
}
}
}
14 changes: 14 additions & 0 deletions GRS/GRS.ApplicationCore/Entities/CandidateSkill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GRS.ApplicationCore.Entities
{
public class CandidateSkill : BaseEntity
{
public int CandidateId { get; set; }
public Candidate Candidate { get; set; }
public int SkillId { get; set; }
public Skill Skill { get; set; }
}
}
11 changes: 11 additions & 0 deletions GRS/GRS.ApplicationCore/Entities/Skill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GRS.ApplicationCore.Entities
{
public class Skill : BaseEntity
{
public string Name { get; set; }
}
}
7 changes: 7 additions & 0 deletions GRS/GRS.ApplicationCore/GRS.ApplicationCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>

</Project>
15 changes: 15 additions & 0 deletions GRS/GRS.ApplicationCore/Interfaces/IAppLogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GRS.ApplicationCore.Interfaces
{
/// <summary>
/// This type eliminates the need to depend directly on the ASP.NET Core logging types.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IAppLogger<T>
{
void LogWarning(string message, params object[] args);
}
}
17 changes: 17 additions & 0 deletions GRS/GRS.ApplicationCore/Interfaces/IRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using GRS.ApplicationCore.Entities;
using System;
using System.Collections.Generic;
using System.Text;

namespace GRS.ApplicationCore.Interfaces
{
public interface IRepository<T> where T : BaseEntity
{
T GetById(int id);
List<T> List();
List<T> List(ISpecification<T> spec);
T Add(T entity);
void Update(T entity);
void Delete(T entity);
}
}
14 changes: 14 additions & 0 deletions GRS/GRS.ApplicationCore/Interfaces/ISpecification.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq.Expressions;

namespace GRS.ApplicationCore.Interfaces
{
public interface ISpecification<T>
{
Expression<Func<T, bool>> Criteria { get; }
List<Expression<Func<T, object>>> Includes { get; }
void AddInclude(Expression<Func<T, object>> includeExpression);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using GRS.ApplicationCore.Entities;
using GRS.ApplicationCore.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace GRS.ApplicationCore.Specifications
{
public class CandidateSkillsFilterSpecification : ISpecification<CandidateSkill>
{
public CandidateSkillsFilterSpecification(int candidateId) => CandidateId = candidateId;

public int CandidateId { get; }

public Expression<Func<CandidateSkill, bool>> Criteria => c => c.CandidateId == CandidateId;

public List<Expression<Func<CandidateSkill, object>>> Includes { get; } = new List<Expression<Func<CandidateSkill, object>>>();

public void AddInclude(Expression<Func<CandidateSkill, object>> includeExpression)
{
Includes.Add(includeExpression);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using GRS.ApplicationCore.Entities;
using GRS.ApplicationCore.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq.Expressions;

namespace GRS.ApplicationCore.Specifications
{
public class CandidateWithSkillsSpecification : ISpecification<Candidate>
{
public CandidateWithSkillsSpecification(int id)
{
Id = id;
AddInclude(c => c.Skills);
}

public int Id { get; }

public Expression<Func<Candidate, bool>> Criteria =>
c => c.Id == Id;

public List<Expression<Func<Candidate, object>>> Includes { get; } = new List<Expression<Func<Candidate, object>>>();

public void AddInclude(Expression<Func<Candidate, object>> includeExpression)
{
Includes.Add(includeExpression);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using GRS.ApplicationCore.Entities;
using GRS.ApplicationCore.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq.Expressions;

namespace GRS.ApplicationCore.Specifications
{
public class SkillsFilterSpecification : ISpecification<CandidateSkill>
{
public SkillsFilterSpecification(int skillId) => SkillId = skillId;

public int SkillId { get; }

public Expression<Func<CandidateSkill, bool>> Criteria => c => c.SkillId == SkillId;

public List<Expression<Func<CandidateSkill, object>>> Includes { get; } = new List<Expression<Func<CandidateSkill, object>>>();

public void AddInclude(Expression<Func<CandidateSkill, object>> includeExpression)
{
Includes.Add(includeExpression);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v1.1",
"signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v1.1": {
"grs.applicationcore/1.0.0": {
"runtime": {
"GRS.ApplicationCore.dll": {}
}
}
}
},
"libraries": {
"grs.applicationcore/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyTitleAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
108ec953d97c59d663512ad7dc21256320e55f13
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\bin\Debug\netcoreapp1.1\GRS.ApplicationCore.deps.json
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\bin\Debug\netcoreapp1.1\GRS.ApplicationCore.dll
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\bin\Debug\netcoreapp1.1\GRS.ApplicationCore.pdb
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\Debug\netcoreapp1.1\GRS.ApplicationCore.csproj.CoreCompileInputs.cache
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\Debug\netcoreapp1.1\GRS.ApplicationCore.AssemblyInfo.cs
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\Debug\netcoreapp1.1\GRS.ApplicationCore.dll
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\Debug\netcoreapp1.1\GRS.ApplicationCore.pdb
C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\Debug\netcoreapp1.1\GRS.ApplicationCore.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 1,
"dgSpecHash": "DgAIBnLeDutD8GiRflkSG+nfefrQ53bBbGBZ1+JW5HgwpM+yDFbi0HJJUIeokK6AUxkyAhe/mBCuLXrswKMaJQ==",
"success": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\Users\Butt Sahab\source\repos\GRS\GRS.ApplicationCore\obj\project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Butt Sahab\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.3.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.diasymreader.native\1.4.1\build\Microsoft.DiaSymReader.Native.props" Condition="Exists('$(NuGetPackageRoot)microsoft.diasymreader.native\1.4.1\build\Microsoft.DiaSymReader.Native.props')" />
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyTitleAttribute("GRS.ApplicationCore")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
108ec953d97c59d663512ad7dc21256320e55f13
Loading