SHA256
GuestLog - StayEntry detail view and improvements:
- Added detail view for StayEntries. - Added button to delete StayEntries. - Improve queries of StayEntries using a "query config" record. - Enabled LazyLoading for all database relations. This will make easier to find cases where required relations aren't explicitly loaded.
This commit is contained in:
@@ -33,7 +33,7 @@ internal static class EntityMapping
|
||||
};
|
||||
}
|
||||
|
||||
public static StayEntryDTO MapStayEntryEntityToDTO(StayEntry entity)
|
||||
public static StayEntryDTO MapStayEntryEntityToDTO(StayEntry entity, bool includeGuests)
|
||||
{
|
||||
return new()
|
||||
{
|
||||
@@ -45,7 +45,7 @@ internal static class EntityMapping
|
||||
PaymentMethod = entity.PaymentMethod,
|
||||
CreateTime = entity.CreateTime,
|
||||
UpdateTime = entity.UpdateTime,
|
||||
GuestDocuments = [.. entity.GuestDocuments.Select(e => MapGuestDocumentEntityToDTO(e))],
|
||||
GuestDocuments = includeGuests ? [.. entity.GuestDocuments.Select(e => MapGuestDocumentEntityToDTO(e))] : null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user