30 lines
1.1 KiB
C#
30 lines
1.1 KiB
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 {Id = Guid.NewGuid(), TenantCode = "FJP", CompanyName = "Fred J Potter", IsInactive = false },
|
|
new TenantModel {Id = Guid.NewGuid(), TenantCode = "JAZZ", CompanyName = "Jazzbond", IsInactive = false },
|
|
new TenantModel {Id = Guid.NewGuid(), TenantCode = "TDT", CompanyName = "The Digital Tailor", IsInactive = false },
|
|
new TenantModel {Id = Guid.NewGuid(), TenantCode = "HBAS", CompanyName = "Hicks Building and Asbestos Services", IsInactive = false },
|
|
];
|
|
|
|
public async Task<IEnumerable<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.
|
|
}
|
|
}
|