Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathoang989 committed Nov 19, 2023
1 parent 77fb4e6 commit 4674028
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/Mix.Heart/Exceptions/EntityNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@ public EntityNotFoundException(string message) : base(message)
public EntityNotFoundException(string message, Exception innerException) : base(message, innerException)
{
}

protected EntityNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
8 changes: 4 additions & 4 deletions src/Mix.Heart/Exceptions/MixException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ public MixException(string message) : base(message)
{
LogException(message: message);
}

public MixException(string message, Exception innerException) : base(message, innerException)
public MixException(MixErrorStatus status) : base()
{
LogException(ex: innerException, message: message);
Status = status;
LogException(status: status, message: Message);
}

protected MixException(SerializationInfo info, StreamingContext context) : base(info, context)
{
LogException(message: Message);
}

public MixException(MixErrorStatus status, params object[] messages) : base(string.Join('\n', messages))
public MixException(MixErrorStatus status, object description, params object[] messages) : base(string.Join('\n', messages))
{
Status = status;
Value = messages;
Expand Down
2 changes: 1 addition & 1 deletion src/Mix.Heart/Repository/QueryRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public TEntity GetFirst(Expression<Func<TEntity, bool>> predicate)
private string[] FilterSelectedFields()
{
var properties = typeof(TEntity).GetProperties();
return properties.Where(p => p.PropertyType.IsSerializable).Select(p => p.Name).ToArray();
return properties.Where(p => p.PropertyType.IsPublic).Select(p => p.Name).ToArray();
}

protected async Task<PagingResponseModel<TEntity>> ToPagingEntityAsync(
Expand Down

0 comments on commit 4674028

Please sign in to comment.