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,8 @@
namespace EonaCat.gRPC.Core.Dtos;
public class BaseResponseDto<T>
{
public bool IsSuccess { get; set; }
public string? Message { get; set; }
public T? Data { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
using EonaCat.Entities;
namespace EonaCat.gRPC.Core.Entities;
public class BaseEntity : Entity
{
public bool IsDeleted { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace EonaCat.gRPC.Core.Entities;
public class UserEntity : BaseEntity
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string Email { get; set; } = null!;
}
+11
View File
@@ -0,0 +1,11 @@
namespace EonaCat.gRPC.Core.Enums;
public class AppEnums
{
public enum Gender
{
Male = 0,
Female = 1,
Other = 2
}
}
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Constants\**" />
<Compile Remove="Settings\**" />
<EmbeddedResource Remove="Constants\**" />
<EmbeddedResource Remove="Settings\**" />
<None Remove="Constants\**" />
<None Remove="Settings\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="EonaCat.EFCore" Version="0.0.1" />
<PackageReference Include="EonaCat.Mapper" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.9" />
</ItemGroup>
</Project>
@@ -0,0 +1,15 @@
using EonaCat.gRPC.Core.Entities;
using EonaCat.Repositories;
namespace EonaCat.gRPC.Core.Interfaces.Repositories;
public interface IBaseRepository<T> : IRepository<T> where T : BaseEntity
{
/// <param name="acceptAllChangesOnSuccess">
/// Indicates whether <see cref="Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.AcceptAllChanges" /> is called after
/// the changes have been sent successfully to the database.
/// </param>
Task SaveChangesAsync(bool acceptAllChangesOnSuccess);
Task SaveChangesAsync();
void Save();
}
@@ -0,0 +1,7 @@
using EonaCat.gRPC.Core.Entities;
namespace EonaCat.gRPC.Core.Interfaces.Repositories;
public interface IUserRepository : IBaseRepository<UserEntity>
{
}
@@ -0,0 +1,5 @@
namespace EonaCat.gRPC.Core.Interfaces.Services;
public interface IGreeterService
{
}
@@ -0,0 +1,10 @@
using EonaCat.gRPC.Core.Entities;
namespace EonaCat.gRPC.Core.Interfaces.Services;
public interface IUserService
{
Task<long> CreateUser(UserEntity user);
Task<IEnumerable<UserEntity>> GetAsync();
Task<UserEntity> GetAsync(long id);
}