изменени при воостановлнеии сущности

This commit is contained in:
kotcheshir73 2021-04-03 11:38:43 +04:00
parent 908c920d26
commit 1b3e7201a7
4 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ namespace SecurityDatabaseImplementation.Implementations
{
if (exsistEntity.IsDeleted)
{
exsistEntity = Mapper.MapToClass(model, exsistEntity, true);
exsistEntity.IsDeleted = false;
context.SaveChanges();
return OperationResultModel.Success(Mapper.MapToClass<Access, AccessViewModel>(exsistEntity, true));

View File

@ -32,6 +32,7 @@ namespace SecurityDatabaseImplementation.Implementations
{
if (exsistEntity.IsDeleted)
{
exsistEntity = Mapper.MapToClass(model, exsistEntity, true);
exsistEntity.IsDeleted = false;
context.SaveChanges();
return OperationResultModel.Success(Mapper.MapToClass<Role, RoleViewModel>(exsistEntity, true));

View File

@ -33,6 +33,7 @@ namespace SecurityDatabaseImplementation.Implementations
{
if (exsistEntity.IsDeleted)
{
exsistEntity = Mapper.MapToClass(model, exsistEntity, true);
exsistEntity.IsDeleted = false;
context.SaveChanges();
return OperationResultModel.Success(Mapper.MapToClass<UserRole, UserRoleViewModel>(exsistEntity, true));

View File

@ -33,6 +33,7 @@ namespace SecurityDatabaseImplementation.Implementations
{
if (exsistEntity.IsDeleted)
{
exsistEntity = Mapper.MapToClass(model, exsistEntity, true);
exsistEntity.IsDeleted = false;
context.SaveChanges();
return OperationResultModel.Success(Mapper.MapToClass<User, UserViewModel>(exsistEntity, true));