Skip to content

Instantly share code, notes, and snippets.

@nirzaf
Created October 27, 2019 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nirzaf/c8b815c63b113ac1b6b3fe4629495581 to your computer and use it in GitHub Desktop.
Save nirzaf/c8b815c63b113ac1b6b3fe4629495581 to your computer and use it in GitHub Desktop.
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