Created
October 27, 2019 17:51
-
-
Save nirzaf/c8b815c63b113ac1b6b3fe4629495581 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ServerSideSPA.App.DataAccess; | |
using ServerSideSPA.App.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace ServerSideSPA.App.Services | |
{ | |
public class EmployeeService | |
{ | |
EmployeeDataAccessLayer objemployee = new EmployeeDataAccessLayer(); | |
public Task<List<Employee>> GetEmployeeList() | |
{ | |
return Task.FromResult(objemployee.GetAllEmployees()); | |
} | |
public void Create(Employee employee) | |
{ | |
objemployee.AddEmployee(employee); | |
} | |
public Task<Employee> Details(int id) | |
{ | |
return Task.FromResult(objemployee.GetEmployeeData(id)); | |
} | |
public void Edit(Employee employee) | |
{ | |
objemployee.UpdateEmployee(employee); | |
} | |
public void Delete(int id) | |
{ | |
objemployee.DeleteEmployee(id); | |
} | |
public Task<List<Cities>> GetCities() | |
{ | |
return Task.FromResult(objemployee.GetCityData()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment