Add project files.
This commit is contained in:
19
EmployeeLibrary/Data/EmployeeData.cs
Normal file
19
EmployeeLibrary/Data/EmployeeData.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using EmployeeLibrary.Models;
|
||||
|
||||
namespace EmployeeLibrary.Data;
|
||||
|
||||
public class EmployeeData : IEmployeeData
|
||||
{
|
||||
private readonly ISqlDataAccess _db;
|
||||
|
||||
public EmployeeData(ISqlDataAccess db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
public async Task<List<EmployeeModel>> GetEmployees()
|
||||
{
|
||||
var output = await _db.LoadDataAsync<EmployeeModel, dynamic>("dbo.spEmployee_GetAll", new { });
|
||||
return output;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user