Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement layer Architecture #49

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
06b8399
Folder remove
aftabkajal Oct 17, 2018
36560a6
Updating readmi file
aftabkajal Oct 17, 2018
f766e22
Updating code of conduct
aftabkajal Oct 17, 2018
aafd404
Updating readmi file
aftabkajal Oct 17, 2018
d5dc343
Merge pull request #1 from iamkajal/development
aftabkajal Oct 17, 2018
324360e
Architechture modified
aftabkajal Oct 17, 2018
1889255
Data and Infrastructure modified
aftabkajal Oct 17, 2018
a799b2d
Data and Infrastructure modified
aftabkajal Oct 17, 2018
899a06e
Entity Configuration add
aftabkajal Oct 18, 2018
efe582a
Entity Configuration add
aftabkajal Oct 18, 2018
555b5a9
Repository implement
aftabkajal Oct 18, 2018
a969eeb
Service interface and class created
aftabkajal Oct 18, 2018
2999fee
Requisition and Circular Services implemented
aftabkajal Oct 18, 2018
a5bf609
All Services implemented
aftabkajal Oct 18, 2018
1ad7cab
fix typo
aftabkajal Oct 18, 2018
a33d608
Service implement in controller
aftabkajal Oct 19, 2018
2e24920
View Page modified
aftabkajal Oct 19, 2018
4ff0004
fix typo
aftabkajal Oct 19, 2018
b699180
Autofac implement
aftabkajal Oct 19, 2018
02c8a1a
Merge pull request #2 from iamkajal/developmentv1
aftabkajal Oct 19, 2018
f95b93c
Migration add
aftabkajal Oct 19, 2018
eee99b6
fixing error
aftabkajal Oct 19, 2018
fdb7ba2
Update Readme file
aftabkajal Oct 19, 2018
b55a5fc
Merge pull request #3 from iamkajal/developmentv2
aftabkajal Oct 19, 2018
fb87188
Update Readme file
aftabkajal Oct 19, 2018
45199bc
Merge pull request #4 from iamkajal/editreadme
aftabkajal Oct 19, 2018
89929ae
update
aftabkajal Oct 19, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RS Tracker
# RSTracker
### Project Description
Recruitment selection tracker known as RStracker is an web page application to track HR recruitment information.

Expand All @@ -17,3 +17,16 @@ Recruitment selection tracker known as RStracker is an web page application to t
* Entity Framewokr 6
* SQL Server
* Visual Studio 2015 (IDE)

### Contributing

The RSTracker is an open source Project. It is open to everyone.


Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

-----

### Security

To report a security vulnerability, please email [email protected] instead of using the issue tracker.
45 changes: 0 additions & 45 deletions doc/Git Branching and Merging step by step.txt

This file was deleted.

1 change: 0 additions & 1 deletion doc/readme.txt

This file was deleted.

21 changes: 21 additions & 0 deletions src/HSTrackerData/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Server=DESKTOP-9PUKNUG\KAJALSQL2012;Initial Catalog=RSTrackerDB;Trusted_Connection=True;Integrated Security=True" providerName="System.Data.SqlClient" />
<!--<add name="DefaultConnection" connectionString="Data Source=rstrackerdb.database.windows.net;Initial Catalog=RSTrackerDB;User ID=mahedee; Password=leads@123" providerName="System.Data.SqlClient" />-->
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
using System.Data.Entity;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using HSTrackerData.Configuration;
using HSTrackerModel.Models;
using Microsoft.AspNet.Identity.EntityFramework;
using RSTracker.Models;
using System.Data.Entity.ModelConfiguration.Conventions;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RSTracker.Models
namespace HSTrackerData
{
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
}

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
public class AppDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
public AppDbContext() : base("DefaultConnection") { }
public static AppDbContext Create()
{
}

public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
return new AppDbContext();
}

public DbSet<Dept> Dept { get; set; }
Expand All @@ -41,6 +28,10 @@ public static ApplicationDbContext Create()
public DbSet<Circular> Circular { get; set; }
public DbSet<Status> Status { get; set; }

public virtual void Commit()
{
base.SaveChanges();
}

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
Expand Down Expand Up @@ -79,7 +70,7 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)

modelBuilder.Entity<Employee>()
.HasRequired(c => c.Division)
.WithMany(w=>w.Employees)
.WithMany(w => w.Employees)
.HasForeignKey(d => d.DivisionId)
.WillCascadeOnDelete(false);

Expand All @@ -89,8 +80,20 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
.HasForeignKey(d => d.DeptId)
.WillCascadeOnDelete(false);

modelBuilder.Configurations.Add(new CircularConfiguration());
modelBuilder.Configurations.Add(new DeptConfiguration());
modelBuilder.Configurations.Add(new DesignationConfiguration());
modelBuilder.Configurations.Add(new DivisionConfiguration());
modelBuilder.Configurations.Add(new EmployeeConfiguration());
modelBuilder.Configurations.Add(new RequisitionConfiguration());
modelBuilder.Configurations.Add(new StatusConfiguration());
modelBuilder.Configurations.Add(new SubUnitConfiguration());

base.OnModelCreating(modelBuilder);

}



}
}
}
20 changes: 20 additions & 0 deletions src/HSTrackerData/Configuration/CircularConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class CircularConfiguration : EntityTypeConfiguration<Circular>
{
public CircularConfiguration()
{
ToTable("Circular");
Property(c => c.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
21 changes: 21 additions & 0 deletions src/HSTrackerData/Configuration/DeptConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class DeptConfiguration : EntityTypeConfiguration<Dept>
{
public DeptConfiguration()
{
ToTable("Dept");
Property(c => c.Name).IsRequired().HasMaxLength(80);
Property(c => c.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
21 changes: 21 additions & 0 deletions src/HSTrackerData/Configuration/DesignationConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class DesignationConfiguration : EntityTypeConfiguration<Designation>
{
public DesignationConfiguration()
{
ToTable("Designation");
Property(d => d.Name).IsRequired().HasMaxLength(80);
Property(d => d.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
21 changes: 21 additions & 0 deletions src/HSTrackerData/Configuration/DivisionConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class DivisionConfiguration : EntityTypeConfiguration<Division>
{
public DivisionConfiguration()
{
ToTable("Division");
Property(d => d.Name).IsRequired().HasMaxLength(80);
Property(c => c.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
21 changes: 21 additions & 0 deletions src/HSTrackerData/Configuration/EmployeeConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class EmployeeConfiguration : EntityTypeConfiguration<Employee>
{
public EmployeeConfiguration()
{
ToTable("Employee");
Property(e => e.Name).IsRequired().HasMaxLength(100);
Property(e => e.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
21 changes: 21 additions & 0 deletions src/HSTrackerData/Configuration/RequisitionConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using HSTrackerModel.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HSTrackerData.Configuration
{
public class RequisitionConfiguration : EntityTypeConfiguration<Requisition>
{
public RequisitionConfiguration()
{
ToTable("Requisitions");
Property(r => r.RefNo).IsRequired();
Property(r => r.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
}
}
Loading