30 lines
959 B
C#
30 lines
959 B
C#
using Emergence.models;
|
|
using Emergence.services.Interface;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Emergence.services.Services;
|
|
|
|
public class TenantService : ITenantService
|
|
{
|
|
private List<TenantModel> testList = [
|
|
new TenantModel {TenantCode = "FJP", CompanyName ="Fred J Potter" },
|
|
new TenantModel {TenantCode = "JAZZ", CompanyName ="Jazzbond" },
|
|
new TenantModel {TenantCode = "TDT", CompanyName ="The Digital Tailor" },
|
|
new TenantModel {TenantCode = "HBAS", CompanyName ="Hicks Building and Asbestos Services" },
|
|
];
|
|
|
|
public async Task<IList<TenantModel>> GetAllAsync()
|
|
{
|
|
return testList;
|
|
}
|
|
|
|
public async Task<TenantModel> GetByIdAsync(Guid id)
|
|
{
|
|
#pragma warning disable CS8603 // Possible null reference return.
|
|
return testList.FirstOrDefault(f => f.Id == id);
|
|
#pragma warning restore CS8603 // Possible null reference return.
|
|
}
|
|
}
|