Initial version

This commit is contained in:
2026-06-09 22:27:38 +02:00
parent 5afbf3b01c
commit 5ff2ac8941
57 changed files with 2343 additions and 98 deletions
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EonaCat.gRPC.Repository\EonaCat.gRPC.Repository.csproj" />
</ItemGroup>
</Project>
+8
View File
@@ -0,0 +1,8 @@
using EonaCat.gRPC.Core.Interfaces.Services;
namespace EonaCat.gRPC.Service;
public class GreeterService : IGreeterService
{
}
+34
View File
@@ -0,0 +1,34 @@
using EonaCat.gRPC.Core.Entities;
using EonaCat.gRPC.Core.Interfaces.Repositories;
using EonaCat.gRPC.Core.Interfaces.Services;
namespace EonaCat.gRPC.Service;
public class UserService : IUserService
{
private readonly IUserRepository _userRepository;
public UserService(IUserRepository userRepository)
{
_userRepository = userRepository;
}
public async Task<long> CreateUser(UserEntity user)
{
await _userRepository.AddAsync(user);
await _userRepository.SaveChangesAsync();
return user.Id;
}
public async Task<IEnumerable<UserEntity>> GetAsync()
{
var users = await _userRepository.ListAsync();
return users;
}
public async Task<UserEntity> GetAsync(long id)
{
var user = await _userRepository.GetAsync(id);
return user;
}
}