WIP dependency Injection

This commit is contained in:
HuskyTeufel
2021-09-13 15:37:23 +02:00
parent 70fcb1711d
commit 12652b3fa3
96 changed files with 4836 additions and 505 deletions

View File

@@ -0,0 +1,37 @@
using DaSaSo.Domain.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Domain.Services.ClientServices
{
public class ClientService : IClientService
{
private readonly IDataService<Client> _clientService;
public async Task<bool> CreateNewClient(string firstname, string lastname, string street, string country, string postcode)
{
Client client = new Client()
{
Firstname = firstname,
LastName = lastname,
Country = country,
Postcode = postcode,
Street = street
};
await _clientService.Create(client);
return true;
}
public Task<Client> GetClientById(int id)
{
throw new NotImplementedException();
}
public async Task<Client> ListAllClient()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,16 @@
using DaSaSo.Domain.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Domain.Services.ClientServices
{
public interface IClientService
{
Task<Client> ListAllClient();
Task<Client> GetClientById(int id);
Task<bool> CreateNewClient(string firstname, string lastname, string street, string country, string postcode);
}
}

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Domain.Service
namespace DaSaSo.Domain.Services
{
public interface IDataService<T>
{