chore: update core libs
This commit is contained in:
parent
4fcc0a08b8
commit
d0e306b7e4
@ -12,6 +12,7 @@ namespace WorkFlow.API.Controllers;
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
[Obsolete("Use MediatR")]
|
||||
public class ConfigController : CRUDControllerBaseWithErrorHandling<IConfigService, ConfigCreateDto, ConfigDto, ConfigUpdateDto, Config, int>
|
||||
{
|
||||
public ConfigController(ILogger<ConfigController> logger, IConfigService service) : base(logger, service)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using DigitalData.Core.API;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WorkFlow.API.Attributes;
|
||||
@ -13,6 +13,7 @@ namespace WorkFlow.API.Controllers;
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
[Obsolete("Use MediatR")]
|
||||
public class ProfileControlsTFController : CRUDControllerBase<IProfileControlsTFService, ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTFUpdateDto, ProfileControlsTF, long>
|
||||
{
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using DigitalData.Core.API;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WorkFlow.API.Attributes;
|
||||
@ -7,106 +7,106 @@ using WorkFlow.Application.Contracts;
|
||||
using WorkFlow.Application.Dto.ProfileObjState;
|
||||
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]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
public class ProfileObjStateController : CRUDControllerBaseWithErrorHandling<IProfileObjStateService, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, long>
|
||||
private readonly ILogger<ProfileObjStateController> logger;
|
||||
|
||||
public ProfileObjStateController(ILogger<ProfileObjStateController> logger, IProfileObjStateService service) : base(logger, service)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
[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))
|
||||
{
|
||||
if (!User.TryGetUserId(out var id))
|
||||
{
|
||||
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();
|
||||
});
|
||||
logger.LogError("Authorization failed: User ID claim not found.");
|
||||
return Unauthorized("Failed to retrieve user identity.");
|
||||
}
|
||||
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("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(),
|
||||
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 ntc.HasFlag(Flag.NotFound) ? NotFound() : StatusCode(StatusCodes.Status500InternalServerError);
|
||||
logger.LogNotice(ntc);
|
||||
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);
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, "An internal server error occurred.");
|
||||
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) =>
|
||||
{
|
||||
_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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ namespace WorkFlow.API.Controllers;
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
[Obsolete("Use MediatR")]
|
||||
public class StateController : CRUDControllerBaseWithErrorHandling<IStateService, StateCreateDto, StateDto, StateUpdateDto, State, int>
|
||||
{
|
||||
public StateController(ILogger<StateController> logger, IStateService service) : base(logger, service)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using DigitalData.UserManager.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@ -10,6 +10,7 @@ namespace WorkFlow.API.Controllers;
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
[Obsolete("Use MediatR")]
|
||||
public class UserController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<UserController> logger;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using WorkFlow.Application;
|
||||
using DigitalData.UserManager.Application;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Infrastructure;
|
||||
using DigitalData.Core.API;
|
||||
@ -16,8 +15,8 @@ using DigitalData.Auth.Client;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using WorkFlow.API;
|
||||
using Microsoft.Extensions.Options;
|
||||
using DigitalData.Core.Abstractions.Security;
|
||||
using DigitalData.Core.Abstractions.Security.Extensions;
|
||||
using DigitalData.UserManager.DependencyInjection;
|
||||
|
||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||
logger.Info("Logging initialized.");
|
||||
@ -48,7 +47,10 @@ try
|
||||
?? throw new InvalidOperationException(
|
||||
"The 'MediatRLicense' configuration value is missing or empty." +
|
||||
"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.AddDirectorySearchService(config.GetSection("DirectorySearchOptions"));
|
||||
builder.Services.AddJWTService<UserReadDto>(user => new SecurityTokenDescriptor()
|
||||
|
||||
@ -21,11 +21,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<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="NLog" Version="5.3.4" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.14" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
<PackageReference Include="UserManager" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using MediatR;
|
||||
using MediatR;
|
||||
|
||||
namespace WorkFlow.Application.Buttons;
|
||||
|
||||
public record ButtonDto : IUnique<int>
|
||||
public record ButtonDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using WorkFlow.Application.Dto.Config;
|
||||
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>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,10 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using WorkFlow.Application.Dto.ProfileControlsTF;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public interface IProfileControlsTFService : ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>
|
||||
{
|
||||
}
|
||||
@ -1,10 +1,11 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using WorkFlow.Application.Dto.ProfileObjState;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>
|
||||
{
|
||||
Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using WorkFlow.Application.Dto.State;
|
||||
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>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public interface IButtonRepository : ICRUDRepository<Button, int>
|
||||
{
|
||||
public Task<IEnumerable<Button>> ReadAllAsync(int profileId);
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public interface IConfigRepository : ICRUDRepository<Config, int>
|
||||
{
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public interface IProfileControlsTFRepository : ICRUDRepository<ProfileControlsTF, long>
|
||||
{
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public interface IProfileObjStateRepository : ICRUDRepository<ProfileObjState, long>
|
||||
{
|
||||
Task<IEnumerable<ProfileObjState>> ReadAsync(
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Application.Contracts.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public interface IStateRepository : ICRUDRepository<State, int>
|
||||
{
|
||||
}
|
||||
@ -1,9 +1,8 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace WorkFlow.Application.Dto
|
||||
{
|
||||
public record BaseUpdateDto : IUnique<int>
|
||||
public record BaseUpdateDto
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
|
||||
|
||||
@ -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>
|
||||
public record ProfileControlsTFUpdateDto(long Id) : IUnique<long>;
|
||||
}
|
||||
/// <summary>
|
||||
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
|
||||
/// </summary>
|
||||
public record ProfileControlsTFUpdateDto(long Id);
|
||||
@ -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>
|
||||
public record ProfileObjStateUpdateDto(long Id) : IUnique<long>;
|
||||
}
|
||||
/// <summary>
|
||||
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
|
||||
/// </summary>
|
||||
public record ProfileObjStateUpdateDto(long Id);
|
||||
@ -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>
|
||||
public record StateUpdateDto(int Id) : IUnique<int>;
|
||||
}
|
||||
/// <summary>
|
||||
/// This Data Transfer Object (DTO) serves as a placeholder and does not support updates.
|
||||
/// </summary>
|
||||
public record StateUpdateDto(int Id);
|
||||
@ -7,6 +7,7 @@ namespace WorkFlow.Application;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
[Obsolete("Use MediatR")]
|
||||
public static IServiceCollection AddWorkFlowServices(this IServiceCollection services, Action<WorkFlowServiceOptions>? options = null)
|
||||
{
|
||||
WorkFlowServiceOptions diOptions = new();
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application;
|
||||
using WorkFlow.Application.Contracts;
|
||||
using WorkFlow.Application.Dto.Config;
|
||||
using WorkFlow.Domain.Entities;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
|
||||
namespace WorkFlow.Application.Services;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class ConfigService : CRUDService<IConfigRepository, ConfigCreateDto, ConfigDto, Config, int>,
|
||||
IConfigService, ICRUDService<ConfigCreateDto, ConfigDto, Config, int>
|
||||
{
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using WorkFlow.Application.Contracts;
|
||||
using WorkFlow.Application.Dto.ProfileControlsTF;
|
||||
using WorkFlow.Domain.Entities;
|
||||
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>,
|
||||
IProfileControlsTFService, ICRUDService<ProfileControlsTFCreateDto, ProfileControlsTFDto, ProfileControlsTF, long>
|
||||
public ProfileControlsTFService(IProfileControlsTFRepository repository, IMapper mapper) : base(repository, mapper)
|
||||
{
|
||||
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)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,15 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using WorkFlow.Application.Contracts;
|
||||
using WorkFlow.Application.Dto.ProfileObjState;
|
||||
using WorkFlow.Domain.Entities;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
|
||||
namespace WorkFlow.Application.Services;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class ProfileObjStateService : CRUDService<IProfileObjStateRepository, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>,
|
||||
IProfileObjStateService, ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, long>
|
||||
{
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application;
|
||||
using WorkFlow.Application.Contracts;
|
||||
using WorkFlow.Application.Dto.State;
|
||||
using WorkFlow.Domain.Entities;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
|
||||
namespace WorkFlow.Application.Services;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class StateService : CRUDService<IStateRepository, StateCreateDto, StateDto, State, int>,
|
||||
IStateService, ICRUDService<StateCreateDto, StateDto, State, int>
|
||||
{
|
||||
|
||||
@ -7,9 +7,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<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="UserManager.Application" Version="3.1.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
|
||||
<PackageReference Include="UserManager" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace WorkFlow.Domain.Entities;
|
||||
|
||||
[Table("TBMWF_PROF_BUTTONS")]
|
||||
public class Button: IUnique<int>
|
||||
public class Button
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID", TypeName = "int")]
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace WorkFlow.Domain.Entities
|
||||
{
|
||||
[Table("TBMWF_CONFIG", Schema = "dbo")]
|
||||
public class Config : IUnique<int>
|
||||
public class Config
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID")]
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace WorkFlow.Domain.Entities;
|
||||
|
||||
[Table("TBMWF_PROF_CONTROLS_TF", Schema = "dbo")]
|
||||
public class ProfileControlsTF : IUnique<long>
|
||||
public class ProfileControlsTF
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID", TypeName = "bigint")]
|
||||
|
||||
@ -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.Schema;
|
||||
|
||||
namespace WorkFlow.Domain.Entities;
|
||||
|
||||
[Table("TBMWF_PROFILE_OBJ_STATE", Schema = "dbo")]
|
||||
public class ProfileObjState : IUnique<long>
|
||||
public class ProfileObjState
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID")]
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace WorkFlow.Domain.Entities
|
||||
{
|
||||
[Table("TBMWF_WF_STATE", Schema = "dbo")]
|
||||
public class State : IUnique<int>
|
||||
public class State
|
||||
{
|
||||
[Key]
|
||||
[Column("GUID")]
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="UserManager.Domain" Version="3.0.1" />
|
||||
<PackageReference Include="UserManager" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
@ -7,6 +7,7 @@ using WorkFlow.Domain.Entities;
|
||||
namespace WorkFlow.Infrastructure.Repositories;
|
||||
|
||||
//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 ButtonRepository(WFDBContext dbContext) : base(dbContext, dbContext.Buttons)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using WorkFlow.Domain.Entities;
|
||||
@ -6,6 +6,7 @@ using WorkFlow.Domain.Entities;
|
||||
namespace WorkFlow.Infrastructure.Repositories;
|
||||
|
||||
//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 ConfigRepository(WFDBContext dbContext) : base(dbContext, dbContext.Configs)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Infrastructure.Repositories;
|
||||
|
||||
[Obsolete("Use Repository")]
|
||||
public class ProfileControlsTFRepository : CRUDRepository<ProfileControlsTF, long, WFDBContext>, IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, long>
|
||||
{
|
||||
public ProfileControlsTFRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileControlsTFs)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
@ -6,6 +6,7 @@ using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Infrastructure.Repositories;
|
||||
|
||||
[Obsolete("Use Repository")]
|
||||
public class ProfileObjStateRepository : CRUDRepository<ProfileObjState, long, WFDBContext>, IProfileObjStateRepository, ICRUDRepository<ProfileObjState, long>
|
||||
{
|
||||
public ProfileObjStateRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileObjStates)
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
namespace WorkFlow.Infrastructure.Repositories;
|
||||
|
||||
[Obsolete("Use Repository")]
|
||||
public class StateRepository : CRUDRepository<State, int, WFDBContext>, IStateRepository, ICRUDRepository<State, int>
|
||||
{
|
||||
public StateRepository(WFDBContext dbContext) : base(dbContext, dbContext.States)
|
||||
|
||||
@ -7,8 +7,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="UserManager.Infrastructure" Version="3.0.1" />
|
||||
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.1.1" />
|
||||
<PackageReference Include="UserManager" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user