Skip to content

Commit

Permalink
added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mahedee committed Apr 24, 2021
1 parent 90fc17c commit 2477f48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hrm-react/HRM/ClientApp/src/components/Employee/Employees.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import axios from 'axios';

export class Employees extends Component
{
//“Props” is a special keyword in React, which stands for properties and is being used for passing data from one component to another.
constructor(props){

//If you do not call super(props) method, this. props will be undefined
super(props);

this.OnEmployeeEdit = this.OnEmployeeEdit.bind(this);
Expand Down Expand Up @@ -48,6 +51,7 @@ export class Employees extends Component
}

populateEmployeesData(){
// Axios is a library that helps us make http requests to external resources
axios.get("api/Employees/GetEmployees").then(result => {
const response = result.data;
this.setState({employees: response, loading: false, error: ""});
Expand Down
1 change: 1 addition & 0 deletions hrm-react/HRM/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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)
{
// Configure in memory database
services.AddDbContext<HRMContext>(opt => opt.UseInMemoryDatabase("HRMDB"));


Expand Down

0 comments on commit 2477f48

Please sign in to comment.