chore: update core libs

This commit is contained in:
tekh 2025-07-30 14:31:30 +02:00
parent 4fcc0a08b8
commit d0e306b7e4
39 changed files with 197 additions and 187 deletions

View File

@ -12,6 +12,7 @@ namespace WorkFlow.API.Controllers;
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
[Authorize] [Authorize]
[Obsolete("Use MediatR")]
public class ConfigController : CRUDControllerBaseWithErrorHandling<IConfigService, ConfigCreateDto, ConfigDto, ConfigUpdateDto, Config, int> public class ConfigController : CRUDControllerBaseWithErrorHandling<IConfigService, ConfigCreateDto, ConfigDto, ConfigUpdateDto, Config, int>
{ {
public ConfigController(ILogger<ConfigController> logger, IConfigService service) : base(logger, service) public ConfigController(ILogger<ConfigController> logger, IConfigService service) : base(logger, service)

View File

@ -1,5 +1,5 @@
using DigitalData.Core.API; using DigitalData.Core.Abstraction.Application.DTO;
using DigitalData.Core.DTO; using DigitalData.Core.API;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using WorkFlow.API.Attributes; using WorkFlow.API.Attributes;
@ -13,6 +13,7 @@ namespace WorkFlow.API.Controllers;
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
[Authorize] [Authorize]
[Obsolete("Use MediatR")]
public class ProfileControlsTFController : CRUDControllerBase<IProfileControlsTFService, ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTFUpdateDto, ProfileControlsTF, long> public class ProfileControlsTFController : CRUDControllerBase<IProfileControlsTFService, ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTFUpdateDto, ProfileControlsTF, long>
{ {

View File

@ -1,5 +1,5 @@
using DigitalData.Core.API; using DigitalData.Core.Abstraction.Application.DTO;
using DigitalData.Core.DTO; using DigitalData.Core.API;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using WorkFlow.API.Attributes; using WorkFlow.API.Attributes;
@ -7,106 +7,106 @@ using WorkFlow.Application.Contracts;
using WorkFlow.Application.Dto.ProfileObjState; using WorkFlow.Application.Dto.ProfileObjState;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.API.Controllers namespace WorkFlow.API.Controllers;
[APIKeyAuth]
[Route("api/[controller]")]
[ApiController]
[Authorize]
[Obsolete("Use MediatR")]
public class ProfileObjStateController : CRUDControllerBaseWithErrorHandling<IProfileObjStateService, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, long>
{ {
[APIKeyAuth] private readonly ILogger<ProfileObjStateController> logger;
[Route("api/[controller]")]
[ApiController] public ProfileObjStateController(ILogger<ProfileObjStateController> logger, IProfileObjStateService service) : base(logger, service)
[Authorize]
public class ProfileObjStateController : CRUDControllerBaseWithErrorHandling<IProfileObjStateService, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, long>
{ {
private readonly ILogger<ProfileObjStateController> logger; this.logger = logger;
}
public ProfileObjStateController(ILogger<ProfileObjStateController> logger, IProfileObjStateService service) : base(logger, service) [NonAction]
public override Task<IActionResult> GetAll() => base.GetAll();
[NonAction]
public override Task<IActionResult> Update(ProfileObjStateUpdateDto updateDto) => base.Update(updateDto);
[HttpGet]
public async Task<IActionResult> GetAsync(
bool withProfile = true, bool withUser = true, bool withState = true,
int? profileId = null, int? objId = null, bool? profileActive = null)
{
try
{ {
this.logger = logger; if (!User.TryGetUserId(out var id))
}
[NonAction]
public override Task<IActionResult> GetAll() => base.GetAll();
[NonAction]
public override Task<IActionResult> Update(ProfileObjStateUpdateDto updateDto) => base.Update(updateDto);
[HttpGet]
public async Task<IActionResult> GetAsync(
bool withProfile = true, bool withUser = true, bool withState = true,
int? profileId = null, int? objId = null, bool? profileActive = null)
{
try
{ {
if (!User.TryGetUserId(out var id)) logger.LogError("Authorization failed: User ID claim not found.");
{ return Unauthorized("Failed to retrieve user identity.");
logger.LogError("Authorization failed: User ID claim not found.");
return Unauthorized("Failed to retrieve user identity.");
}
return await _service.ReadAsync(
withProfile: withProfile, withUser: withUser, withState,
userId: id,
profileId: profileId, objId: objId)
.ThenAsync(
Success: pctf => pctf.Any() ? Ok(pctf) : NotFound(),
Fail: IActionResult (msg, ntc) =>
{
logger.LogNotice(ntc);
return NotFound();
});
} }
catch (Exception ex)
{
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
}
}
[HttpPost] return await _service.ReadAsync(
public override async Task<IActionResult> Create([FromBody] ProfileObjStateCreateDto createDto) withProfile: withProfile, withUser: withUser, withState,
{ userId: id,
try profileId: profileId, objId: objId)
{ .ThenAsync(
if (!User.TryGetUserId(out var id)) Success: pctf => pctf.Any() ? Ok(pctf) : NotFound(),
{
logger.LogError("Authorization failed: User ID claim not found.");
return StatusCode(StatusCodes.Status500InternalServerError, "Failed to retrieve user identity.");
}
if (createDto.UserId != id)
return Unauthorized();
return await base.Create(createDto);
}
catch (Exception ex)
{
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
}
}
[HttpDelete]
public override async Task<IActionResult> Delete([FromRoute] long id)
{
try
{
if (!User.TryGetUserId(out var userId))
{
logger.LogError("Authorization failed: User ID claim not found.");
return StatusCode(StatusCodes.Status500InternalServerError, "Failed to retrieve user identity.");
}
return await _service.ReadByIdAsync(id).ThenAsync(
SuccessAsync: async pctf => pctf.UserId == userId ? await base.Delete(id) : Unauthorized(),
Fail: IActionResult (msg, ntc) => Fail: IActionResult (msg, ntc) =>
{ {
_logger.LogNotice(ntc); logger.LogNotice(ntc);
return ntc.HasFlag(Flag.NotFound) ? NotFound() : StatusCode(StatusCodes.Status500InternalServerError); return NotFound();
}); });
} }
catch (Exception ex) catch (Exception ex)
{
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
}
}
[HttpPost]
public override async Task<IActionResult> Create([FromBody] ProfileObjStateCreateDto createDto)
{
try
{
if (!User.TryGetUserId(out var id))
{ {
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message); logger.LogError("Authorization failed: User ID claim not found.");
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred."); return StatusCode(StatusCodes.Status500InternalServerError, "Failed to retrieve user identity.");
} }
if (createDto.UserId != id)
return Unauthorized();
return await base.Create(createDto);
}
catch (Exception ex)
{
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
}
}
[HttpDelete]
public override async Task<IActionResult> Delete([FromRoute] long id)
{
try
{
if (!User.TryGetUserId(out var userId))
{
logger.LogError("Authorization failed: User ID claim not found.");
return StatusCode(StatusCodes.Status500InternalServerError, "Failed to retrieve user identity.");
}
return await _service.ReadByIdAsync(id).ThenAsync(
SuccessAsync: async pctf => pctf.UserId == userId ? await base.Delete(id) : Unauthorized(),
Fail: IActionResult (msg, ntc) =>
{
_logger.LogNotice(ntc);
return ntc.HasFlag(Flag.NotFound) ? NotFound() : StatusCode(StatusCodes.Status500InternalServerError);
});
}
catch (Exception ex)
{
logger.LogError(ex, "An unexpected error occurred while processing the request: {Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
} }
} }
} }

View File

@ -12,6 +12,7 @@ namespace WorkFlow.API.Controllers;
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
[Authorize] [Authorize]
[Obsolete("Use MediatR")]
public class StateController : CRUDControllerBaseWithErrorHandling<IStateService, StateCreateDto, StateDto, StateUpdateDto, State, int> public class StateController : CRUDControllerBaseWithErrorHandling<IStateService, StateCreateDto, StateDto, StateUpdateDto, State, int>
{ {
public StateController(ILogger<StateController> logger, IStateService service) : base(logger, service) public StateController(ILogger<StateController> logger, IStateService service) : base(logger, service)

View File

@ -1,4 +1,4 @@
using DigitalData.Core.DTO; using DigitalData.Core.Abstraction.Application.DTO;
using DigitalData.UserManager.Application.Contracts; using DigitalData.UserManager.Application.Contracts;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -10,6 +10,7 @@ namespace WorkFlow.API.Controllers;
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
[Authorize] [Authorize]
[Obsolete("Use MediatR")]
public class UserController : ControllerBase public class UserController : ControllerBase
{ {
private readonly ILogger<UserController> logger; private readonly ILogger<UserController> logger;

View File

@ -1,5 +1,4 @@
using WorkFlow.Application; using WorkFlow.Application;
using DigitalData.UserManager.Application;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WorkFlow.Infrastructure; using WorkFlow.Infrastructure;
using DigitalData.Core.API; using DigitalData.Core.API;
@ -16,8 +15,8 @@ using DigitalData.Auth.Client;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using WorkFlow.API; using WorkFlow.API;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using DigitalData.Core.Abstractions.Security;
using DigitalData.Core.Abstractions.Security.Extensions; using DigitalData.Core.Abstractions.Security.Extensions;
using DigitalData.UserManager.DependencyInjection;
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
logger.Info("Logging initialized."); logger.Info("Logging initialized.");
@ -48,7 +47,10 @@ try
?? throw new InvalidOperationException( ?? throw new InvalidOperationException(
"The 'MediatRLicense' configuration value is missing or empty." + "The 'MediatRLicense' configuration value is missing or empty." +
"Please ensure it is properly set in the configuration source."); "Please ensure it is properly set in the configuration source.");
builder.Services.AddWorkFlowServices(opt => opt.MediatRLicense = mediatRLicense).AddWorkFlowRepositories().AddUserManager<WFDBContext>(); builder.Services.AddWorkFlowServices(opt => opt.MediatRLicense = mediatRLicense).AddWorkFlowRepositories();
builder.Services.AddUserManager<WFDBContext>();
builder.Services.AddCookieBasedLocalizer(); builder.Services.AddCookieBasedLocalizer();
builder.Services.AddDirectorySearchService(config.GetSection("DirectorySearchOptions")); builder.Services.AddDirectorySearchService(config.GetSection("DirectorySearchOptions"));
builder.Services.AddJWTService<UserReadDto>(user => new SecurityTokenDescriptor() builder.Services.AddJWTService<UserReadDto>(user => new SecurityTokenDescriptor()

View File

@ -21,11 +21,13 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Auth.Client" Version="1.3.7" /> <PackageReference Include="DigitalData.Auth.Client" Version="1.3.7" />
<PackageReference Include="DigitalData.Core.API" Version="2.1.1" /> <PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.0.0" />
<PackageReference Include="DigitalData.Core.API" Version="2.2.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.20" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.20" />
<PackageReference Include="NLog" Version="5.3.4" /> <PackageReference Include="NLog" Version="5.3.4" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.14" /> <PackageReference Include="NLog.Web.AspNetCore" Version="5.3.14" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="UserManager" Version="1.1.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,9 +1,8 @@
using DigitalData.Core.Abstractions; using MediatR;
using MediatR;
namespace WorkFlow.Application.Buttons; namespace WorkFlow.Application.Buttons;
public record ButtonDto : IUnique<int> public record ButtonDto
{ {
public int Id { get; init; } public int Id { get; init; }

View File

@ -1,10 +1,10 @@
using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Abstraction.Application;
using WorkFlow.Application.Dto.Config; using WorkFlow.Application.Dto.Config;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts namespace WorkFlow.Application.Contracts;
[Obsolete("Use MediatR")]
public interface IConfigService : ICRUDService<ConfigCreateDto, ConfigDto, Config, int>
{ {
public interface IConfigService : ICRUDService<ConfigCreateDto, ConfigDto, Config, int>
{
}
} }

View File

@ -1,9 +1,10 @@
using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Abstraction.Application;
using WorkFlow.Application.Dto.ProfileControlsTF; using WorkFlow.Application.Dto.ProfileControlsTF;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts; namespace WorkFlow.Application.Contracts;
[Obsolete("Use MediatR")]
public interface IProfileControlsTFService : ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long> public interface IProfileControlsTFService : ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>
{ {
} }

View File

@ -1,10 +1,11 @@
using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Abstraction.Application;
using DigitalData.Core.DTO; using DigitalData.Core.Abstraction.Application.DTO;
using WorkFlow.Application.Dto.ProfileObjState; using WorkFlow.Application.Dto.ProfileObjState;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts; namespace WorkFlow.Application.Contracts;
[Obsolete("Use MediatR")]
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long> public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>
{ {
Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync( Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(

View File

@ -1,10 +1,10 @@
using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Abstraction.Application;
using WorkFlow.Application.Dto.State; using WorkFlow.Application.Dto.State;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts namespace WorkFlow.Application.Contracts;
[Obsolete("Use MediatR")]
public interface IStateService : ICRUDService<StateCreateDto, StateDto, State, int>
{ {
public interface IStateService : ICRUDService<StateCreateDto, StateDto, State, int>
{
}
} }

View File

@ -1,8 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories; namespace WorkFlow.Application.Contracts.Repositories;
[Obsolete("Use IRepository")]
public interface IButtonRepository : ICRUDRepository<Button, int> public interface IButtonRepository : ICRUDRepository<Button, int>
{ {
public Task<IEnumerable<Button>> ReadAllAsync(int profileId); public Task<IEnumerable<Button>> ReadAllAsync(int profileId);

View File

@ -1,8 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories; namespace WorkFlow.Application.Contracts.Repositories;
[Obsolete("Use IRepository")]
public interface IConfigRepository : ICRUDRepository<Config, int> public interface IConfigRepository : ICRUDRepository<Config, int>
{ {
} }

View File

@ -1,8 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories; namespace WorkFlow.Application.Contracts.Repositories;
[Obsolete("Use IRepository")]
public interface IProfileControlsTFRepository : ICRUDRepository<ProfileControlsTF, long> public interface IProfileControlsTFRepository : ICRUDRepository<ProfileControlsTF, long>
{ {
} }

View File

@ -1,8 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories; namespace WorkFlow.Application.Contracts.Repositories;
[Obsolete("Use IRepository")]
public interface IProfileObjStateRepository : ICRUDRepository<ProfileObjState, long> public interface IProfileObjStateRepository : ICRUDRepository<ProfileObjState, long>
{ {
Task<IEnumerable<ProfileObjState>> ReadAsync( Task<IEnumerable<ProfileObjState>> ReadAsync(

View File

@ -1,8 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories; namespace WorkFlow.Application.Contracts.Repositories;
[Obsolete("Use IRepository")]
public interface IStateRepository : ICRUDRepository<State, int> public interface IStateRepository : ICRUDRepository<State, int>
{ {
} }

View File

@ -1,9 +1,8 @@
using DigitalData.Core.Abstractions; using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace WorkFlow.Application.Dto namespace WorkFlow.Application.Dto
{ {
public record BaseUpdateDto : IUnique<int> public record BaseUpdateDto
{ {
public required int Id { get; init; } public required int Id { get; init; }

View File

@ -1,9 +1,6 @@
using DigitalData.Core.Abstractions; namespace WorkFlow.Application.Dto.ProfileControlsTF;
namespace WorkFlow.Application.Dto.ProfileControlsTF /// <summary>
{ /// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
/// <summary> /// </summary>
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates. public record ProfileControlsTFUpdateDto(long Id);
/// </summary>
public record ProfileControlsTFUpdateDto(long Id) : IUnique<long>;
}

View File

@ -1,9 +1,6 @@
using DigitalData.Core.Abstractions; namespace WorkFlow.Application.Dto.ProfileObjState;
namespace WorkFlow.Application.Dto.ProfileObjState /// <summary>
{ /// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
/// <summary> /// </summary>
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates. public record ProfileObjStateUpdateDto(long Id);
/// </summary>
public record ProfileObjStateUpdateDto(long Id) : IUnique<long>;
}

View File

@ -1,9 +1,6 @@
using DigitalData.Core.Abstractions; namespace WorkFlow.Application.Dto.State;
namespace WorkFlow.Application.Dto.State /// <summary>
{ /// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
/// <summary> /// </summary>
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates. public record StateUpdateDto(int Id);
/// </summary>
public record StateUpdateDto(int Id) : IUnique<int>;
}

View File

@ -7,6 +7,7 @@ namespace WorkFlow.Application;
public static class DependencyInjection public static class DependencyInjection
{ {
[Obsolete("Use MediatR")]
public static IServiceCollection AddWorkFlowServices(this IServiceCollection services, Action<WorkFlowServiceOptions>? options = null) public static IServiceCollection AddWorkFlowServices(this IServiceCollection services, Action<WorkFlowServiceOptions>? options = null)
{ {
WorkFlowServiceOptions diOptions = new(); WorkFlowServiceOptions diOptions = new();

View File

@ -1,13 +1,14 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.Application; using DigitalData.Core.Application;
using WorkFlow.Application.Contracts; using WorkFlow.Application.Contracts;
using WorkFlow.Application.Dto.Config; using WorkFlow.Application.Dto.Config;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using DigitalData.Core.Abstraction.Application;
namespace WorkFlow.Application.Services; namespace WorkFlow.Application.Services;
[Obsolete("Use MediatR")]
public class ConfigService : CRUDService<IConfigRepository, ConfigCreateDto, ConfigDto, Config, int>, public class ConfigService : CRUDService<IConfigRepository, ConfigCreateDto, ConfigDto, Config, int>,
IConfigService, ICRUDService<ConfigCreateDto, ConfigDto, Config, int> IConfigService, ICRUDService<ConfigCreateDto, ConfigDto, Config, int>
{ {

View File

@ -1,24 +1,24 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.Application; using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using WorkFlow.Application.Contracts; using WorkFlow.Application.Contracts;
using WorkFlow.Application.Dto.ProfileControlsTF; using WorkFlow.Application.Dto.ProfileControlsTF;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using DigitalData.Core.Abstraction.Application;
using DigitalData.Core.Abstraction.Application.DTO;
namespace WorkFlow.Application.Services namespace WorkFlow.Application.Services;
[Obsolete("Use MediatR")]
public class ProfileControlsTFService : CRUDService<IProfileControlsTFRepository, ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>,
IProfileControlsTFService, ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>
{ {
public class ProfileControlsTFService : CRUDService<IProfileControlsTFRepository, ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>, public ProfileControlsTFService(IProfileControlsTFRepository repository, IMapper mapper) : base(repository, mapper)
IProfileControlsTFService, ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>
{ {
public ProfileControlsTFService(IProfileControlsTFRepository repository, IMapper mapper) : base(repository, mapper) }
{
}
public Task<DataResult<IEnumerable<ProfileControlsTFDto>>> ReadAsync(bool withProfile = true, bool withUser = false, int? userId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null) public Task<DataResult<IEnumerable<ProfileControlsTFDto>>> ReadAsync(bool withProfile = true, bool withUser = false, int? userId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
}
} }
} }

View File

@ -1,14 +1,15 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.Application; using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using WorkFlow.Application.Contracts; using WorkFlow.Application.Contracts;
using WorkFlow.Application.Dto.ProfileObjState; using WorkFlow.Application.Dto.ProfileObjState;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using DigitalData.Core.Abstraction.Application;
using DigitalData.Core.Abstraction.Application.DTO;
namespace WorkFlow.Application.Services; namespace WorkFlow.Application.Services;
[Obsolete("Use MediatR")]
public class ProfileObjStateService : CRUDService<IProfileObjStateRepository, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>, public class ProfileObjStateService : CRUDService<IProfileObjStateRepository, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>,
IProfileObjStateService, ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long> IProfileObjStateService, ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>
{ {

View File

@ -1,13 +1,14 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.Application; using DigitalData.Core.Application;
using WorkFlow.Application.Contracts; using WorkFlow.Application.Contracts;
using WorkFlow.Application.Dto.State; using WorkFlow.Application.Dto.State;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using DigitalData.Core.Abstraction.Application;
namespace WorkFlow.Application.Services; namespace WorkFlow.Application.Services;
[Obsolete("Use MediatR")]
public class StateService : CRUDService<IStateRepository, StateCreateDto, StateDto, State, int>, public class StateService : CRUDService<IStateRepository, StateCreateDto, StateDto, State, int>,
IStateService, ICRUDService<StateCreateDto, StateDto, State, int> IStateService, ICRUDService<StateCreateDto, StateDto, State, int>
{ {

View File

@ -7,9 +7,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Core.Application" Version="3.2.0" /> <PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.0.0" />
<PackageReference Include="DigitalData.Core.Application" Version="3.3.4" />
<PackageReference Include="MediatR" Version="13.0.0" /> <PackageReference Include="MediatR" Version="13.0.0" />
<PackageReference Include="UserManager.Application" Version="3.1.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
<PackageReference Include="UserManager" Version="1.1.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,11 +1,10 @@
using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities; namespace WorkFlow.Domain.Entities;
[Table("TBMWF_PROF_BUTTONS")] [Table("TBMWF_PROF_BUTTONS")]
public class Button: IUnique<int> public class Button
{ {
[Key] [Key]
[Column("GUID", TypeName = "int")] [Column("GUID", TypeName = "int")]

View File

@ -1,11 +1,10 @@
using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities namespace WorkFlow.Domain.Entities
{ {
[Table("TBMWF_CONFIG", Schema = "dbo")] [Table("TBMWF_CONFIG", Schema = "dbo")]
public class Config : IUnique<int> public class Config
{ {
[Key] [Key]
[Column("GUID")] [Column("GUID")]

View File

@ -1,11 +1,10 @@
using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities; namespace WorkFlow.Domain.Entities;
[Table("TBMWF_PROF_CONTROLS_TF", Schema = "dbo")] [Table("TBMWF_PROF_CONTROLS_TF", Schema = "dbo")]
public class ProfileControlsTF : IUnique<long> public class ProfileControlsTF
{ {
[Key] [Key]
[Column("GUID", TypeName = "bigint")] [Column("GUID", TypeName = "bigint")]

View File

@ -1,12 +1,11 @@
using DigitalData.Core.Abstractions; using DigitalData.UserManager.Domain.Entities;
using DigitalData.UserManager.Domain.Entities;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities; namespace WorkFlow.Domain.Entities;
[Table("TBMWF_PROFILE_OBJ_STATE", Schema = "dbo")] [Table("TBMWF_PROFILE_OBJ_STATE", Schema = "dbo")]
public class ProfileObjState : IUnique<long> public class ProfileObjState
{ {
[Key] [Key]
[Column("GUID")] [Column("GUID")]

View File

@ -1,11 +1,10 @@
using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace WorkFlow.Domain.Entities namespace WorkFlow.Domain.Entities
{ {
[Table("TBMWF_WF_STATE", Schema = "dbo")] [Table("TBMWF_WF_STATE", Schema = "dbo")]
public class State : IUnique<int> public class State
{ {
[Key] [Key]
[Column("GUID")] [Column("GUID")]

View File

@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="UserManager.Domain" Version="3.0.1" /> <PackageReference Include="UserManager" Version="1.1.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.Core.Infrastructure; using DigitalData.Core.Infrastructure;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
@ -7,6 +7,7 @@ using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure.Repositories;
//TODO: Make the db context type generic so that it can be used by other projects with different db contexts. //TODO: Make the db context type generic so that it can be used by other projects with different db contexts.
[Obsolete("Use Repository")]
public class ButtonRepository : CRUDRepository<Button, int, WFDBContext>, IButtonRepository, ICRUDRepository<Button, int> public class ButtonRepository : CRUDRepository<Button, int, WFDBContext>, IButtonRepository, ICRUDRepository<Button, int>
{ {
public ButtonRepository(WFDBContext dbContext) : base(dbContext, dbContext.Buttons) public ButtonRepository(WFDBContext dbContext) : base(dbContext, dbContext.Buttons)

View File

@ -1,4 +1,4 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.Core.Infrastructure; using DigitalData.Core.Infrastructure;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
@ -6,6 +6,7 @@ using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure.Repositories;
//TODO: Make the db context type generic so that it can be used by other projects with different db contexts. //TODO: Make the db context type generic so that it can be used by other projects with different db contexts.
[Obsolete("Use Repository")]
public class ConfigRepository : CRUDRepository<Config, int, WFDBContext>, IConfigRepository, ICRUDRepository<Config, int> public class ConfigRepository : CRUDRepository<Config, int, WFDBContext>, IConfigRepository, ICRUDRepository<Config, int>
{ {
public ConfigRepository(WFDBContext dbContext) : base(dbContext, dbContext.Configs) public ConfigRepository(WFDBContext dbContext) : base(dbContext, dbContext.Configs)

View File

@ -1,11 +1,11 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.Core.Infrastructure; using DigitalData.Core.Infrastructure;
using Microsoft.EntityFrameworkCore;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure.Repositories;
[Obsolete("Use Repository")]
public class ProfileControlsTFRepository : CRUDRepository<ProfileControlsTF, long, WFDBContext>, IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, long> public class ProfileControlsTFRepository : CRUDRepository<ProfileControlsTF, long, WFDBContext>, IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, long>
{ {
public ProfileControlsTFRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileControlsTFs) public ProfileControlsTFRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileControlsTFs)

View File

@ -1,4 +1,4 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.Core.Infrastructure; using DigitalData.Core.Infrastructure;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
@ -6,6 +6,7 @@ using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure.Repositories;
[Obsolete("Use Repository")]
public class ProfileObjStateRepository : CRUDRepository<ProfileObjState, long, WFDBContext>, IProfileObjStateRepository, ICRUDRepository<ProfileObjState, long> public class ProfileObjStateRepository : CRUDRepository<ProfileObjState, long, WFDBContext>, IProfileObjStateRepository, ICRUDRepository<ProfileObjState, long>
{ {
public ProfileObjStateRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileObjStates) public ProfileObjStateRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileObjStates)

View File

@ -1,10 +1,11 @@
using DigitalData.Core.Abstractions.Infrastructure; using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.Core.Infrastructure; using DigitalData.Core.Infrastructure;
using WorkFlow.Application.Contracts.Repositories; using WorkFlow.Application.Contracts.Repositories;
using WorkFlow.Domain.Entities; using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure.Repositories;
[Obsolete("Use Repository")]
public class StateRepository : CRUDRepository<State, int, WFDBContext>, IStateRepository, ICRUDRepository<State, int> public class StateRepository : CRUDRepository<State, int, WFDBContext>, IStateRepository, ICRUDRepository<State, int>
{ {
public StateRepository(WFDBContext dbContext) : base(dbContext, dbContext.States) public StateRepository(WFDBContext dbContext) : base(dbContext, dbContext.States)

View File

@ -7,8 +7,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" /> <PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.0.0" />
<PackageReference Include="UserManager.Infrastructure" Version="3.0.1" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="2.1.1" />
<PackageReference Include="UserManager" Version="1.1.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>