Entfernt das DataContracts-Projekt. Guid-Attribut umbenannt in Id mit Column-Attribut für jede Entität und dto.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public record GroupReadDto
|
||||
(
|
||||
int Guid,
|
||||
int Id,
|
||||
string? Name,
|
||||
bool? AdSync,
|
||||
bool? Internal,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public record GroupUpdateDto
|
||||
(
|
||||
int Guid,
|
||||
int Id,
|
||||
string? Name,
|
||||
bool? AdSync,
|
||||
bool? Internal,
|
||||
|
||||
@@ -4,7 +4,7 @@ using DigitalData.UserManager.Application.DTOs.User;
|
||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
||||
{
|
||||
public record GroupOfUserReadDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
int UserId,
|
||||
int GroupId,
|
||||
string? Comment,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
||||
{
|
||||
public record GroupOfUserUpdateDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
int? UserId,
|
||||
int? GroupId,
|
||||
string? Comment,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Module
|
||||
{
|
||||
public record ModuleDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
string? Name,
|
||||
string? ShortName
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
||||
{
|
||||
public record ModuleOfUserReadDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
int UserId,
|
||||
int ModuleId,
|
||||
string? Comment,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
||||
{
|
||||
public record ModuleOfUserUpdateDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
int UserId,
|
||||
int ModuleId,
|
||||
bool? IsAdmin,
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace DigitalData.UserManager.Application.DTOs.User
|
||||
{
|
||||
public record UserReadDto()
|
||||
{
|
||||
public int Guid { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? Prename { get; set; }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.User
|
||||
{
|
||||
public record UserUpdateDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
string? Prename,
|
||||
string? Name,
|
||||
string? Username,
|
||||
|
||||
@@ -4,7 +4,7 @@ using DigitalData.UserManager.Application.DTOs.User;
|
||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
||||
{
|
||||
public record UserRepReadDto(
|
||||
int Guid,
|
||||
int Id,
|
||||
int UserId,
|
||||
int? RepGroupId,
|
||||
int RightGroupId,
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace DigitalData.UserManager.Application.Services
|
||||
{
|
||||
var group = _mapper.MapOrThrow<Group>(adGroup);
|
||||
|
||||
if (await HasEntity(group.Guid))
|
||||
if (await HasEntity(group.Id))
|
||||
return Result.Fail<int>().Message(_localizer[Key.GroupAlreadyExists.ToString()]);
|
||||
|
||||
var createdGroup = await _repository.CreateAsync(group);
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace DigitalData.UserManager.Application.Services
|
||||
{
|
||||
var user = _mapper.MapOrThrow<User>(upDto);
|
||||
|
||||
if (await HasEntity(user.Guid))
|
||||
if (await HasEntity(user.Id))
|
||||
return Result.Fail<int>().Message(_localizer[Key.UserAlreadyExists]);
|
||||
|
||||
var createdUser = await _repository.CreateAsync(user);
|
||||
|
||||
Reference in New Issue
Block a user