diff --git a/HotelBookingPlatform.API/Controllers/AmenityController.cs b/HotelBookingPlatform.API/Controllers/AmenityController.cs index a9a3649..f195b6c 100644 --- a/HotelBookingPlatform.API/Controllers/AmenityController.cs +++ b/HotelBookingPlatform.API/Controllers/AmenityController.cs @@ -20,15 +20,8 @@ public AmenityController(IAmenityService amenityService, IResponseHandler respon Tags = new[] { "Amenities" })] public async Task GetAllAmenities() { - try - { var amenities = await _amenityService.GetAllAmenity(); return _responseHandler.Success(amenities, "Amenities retrieved successfully."); - } - catch (KeyNotFoundException ex) - { - return _responseHandler.NotFound(ex.Message); - } } } diff --git a/HotelBookingPlatform.API/Production_Env_Log/logs202408.txt b/HotelBookingPlatform.API/Production_Env_Log/logs202408.txt index 4b10c6b..fe2fb59 100644 --- a/HotelBookingPlatform.API/Production_Env_Log/logs202408.txt +++ b/HotelBookingPlatform.API/Production_Env_Log/logs202408.txt @@ -18914,3 +18914,3412 @@ VALUES (@p10, @p11); 2024-08-23 23:06:32.265 +03:00 [DBG] Connection id "0HN63LRK6HTBF" is closed. The last processed stream ID was 1. 2024-08-23 23:06:32.271 +03:00 [DBG] Connection id "0HN63LRK6HTBF" sending FIN because: "The Socket transport's send loop completed gracefully." 2024-08-23 23:06:32.289 +03:00 [DBG] Connection id "0HN63LRK6HTBF" stopped. +2024-08-24 20:49:07.765 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 20:49:08.178 +03:00 [DBG] Hosting starting +2024-08-24 20:49:08.468 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 20:49:08.481 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 20:49:08.598 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 20:49:08.631 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 20:49:08.659 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 20:49:08.719 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 20:49:08.746 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 20:49:08.749 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 20:49:08.752 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 20:49:08.778 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 20:49:08.788 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 20:49:08.801 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 20:49:08.807 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 20:49:08.827 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 20:49:08.845 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 20:49:08.860 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 20:49:08.866 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 20:49:09.921 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 20:49:10.139 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 20:49:10.142 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 20:49:10.145 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 20:49:10.148 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 20:49:10.150 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 20:49:10.154 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 20:49:10.157 +03:00 [INF] Hosting environment: Development +2024-08-24 20:49:10.161 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 20:49:10.164 +03:00 [DBG] Hosting started +2024-08-24 20:49:10.390 +03:00 [DBG] Connection id "0HN64CK7HI5QI" accepted. +2024-08-24 20:49:10.398 +03:00 [DBG] Connection id "0HN64CK7HI5QI" started. +2024-08-24 20:49:10.484 +03:00 [DBG] Connection id "0HN64CK7HI5QJ" accepted. +2024-08-24 20:49:10.488 +03:00 [DBG] Connection id "0HN64CK7HI5QJ" started. +2024-08-24 20:49:11.683 +03:00 [DBG] Connection id "0HN64CK7HI5QK" accepted. +2024-08-24 20:49:12.060 +03:00 [DBG] Connection id "0HN64CK7HI5QK" started. +2024-08-24 20:49:12.133 +03:00 [DBG] Connection id "0HN64CK7HI5QL" accepted. +2024-08-24 20:49:12.140 +03:00 [DBG] Connection id "0HN64CK7HI5QL" started. +2024-08-24 20:49:12.233 +03:00 [DBG] Connection id "0HN64CK7HI5QL" received FIN. +2024-08-24 20:49:12.315 +03:00 [DBG] Connection 0HN64CK7HI5QK established using the following protocol: "Tls13" +2024-08-24 20:49:12.315 +03:00 [DBG] Connection 0HN64CK7HI5QL established using the following protocol: "Tls13" +2024-08-24 20:49:12.374 +03:00 [DBG] Connection id "0HN64CK7HI5QL" is closed. The last processed stream ID was 0. +2024-08-24 20:49:12.382 +03:00 [DBG] Connection id "0HN64CK7HI5QL" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:12.414 +03:00 [DBG] Connection id "0HN64CK7HI5QL" stopped. +2024-08-24 20:49:12.525 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger - - +2024-08-24 20:49:13.513 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 20:49:13.603 +03:00 [DBG] No candidates found for the request path '/swagger' +2024-08-24 20:49:13.607 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:13.730 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 20:49:13.730 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger - - - 301 0 - 1215.6213ms +2024-08-24 20:49:13.744 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 20:49:13.746 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:14.419 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 20:49:14.461 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 20:49:14.470 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 737.6089ms +2024-08-24 20:49:14.491 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/swagger-ui.css - - +2024-08-24 20:49:14.492 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/swagger-ui-standalone-preset.js - - +2024-08-24 20:49:14.491 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/swagger-ui-bundle.js - - +2024-08-24 20:49:14.492 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 20:49:14.494 +03:00 [DBG] No candidates found for the request path '/swagger/swagger-ui.css' +2024-08-24 20:49:14.496 +03:00 [DBG] No candidates found for the request path '/swagger/swagger-ui-standalone-preset.js' +2024-08-24 20:49:14.498 +03:00 [DBG] No candidates found for the request path '/swagger/swagger-ui-bundle.js' +2024-08-24 20:49:14.503 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:14.506 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:14.509 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:14.511 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 19.1008ms +2024-08-24 20:49:14.520 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 20:49:14.649 +03:00 [INF] Sending file. Request path: '/swagger-ui.css'. Physical path: 'N/A' +2024-08-24 20:49:14.649 +03:00 [INF] Sending file. Request path: '/swagger-ui-standalone-preset.js'. Physical path: 'N/A' +2024-08-24 20:49:14.666 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/swagger-ui.css - - - 200 144929 text/css 175.1320ms +2024-08-24 20:49:14.666 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/swagger-ui-standalone-preset.js - - - 200 312163 application/javascript 174.0656ms +2024-08-24 20:49:14.696 +03:00 [INF] Sending file. Request path: '/swagger-ui-bundle.js'. Physical path: 'N/A' +2024-08-24 20:49:14.699 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/swagger-ui-bundle.js - - - 200 1061536 application/javascript 207.4919ms +2024-08-24 20:49:14.816 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 297.0202ms +2024-08-24 20:49:15.337 +03:00 [DBG] Connection id "0HN64CK7HI5QK" received FIN. +2024-08-24 20:49:15.341 +03:00 [DBG] Connection id "0HN64CK7HI5QK" is closed. The last processed stream ID was 13. +2024-08-24 20:49:15.345 +03:00 [DBG] Connection id "0HN64CK7HI5QK" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:15.359 +03:00 [DBG] Connection id "0HN64CK7HI5QK" stopped. +2024-08-24 20:49:17.527 +03:00 [DBG] Connection id "0HN64CK7HI5QM" accepted. +2024-08-24 20:49:17.531 +03:00 [DBG] Connection id "0HN64CK7HI5QM" started. +2024-08-24 20:49:17.545 +03:00 [DBG] Connection 0HN64CK7HI5QM established using the following protocol: "Tls13" +2024-08-24 20:49:17.552 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 20:49:17.556 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 20:49:17.560 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:17.628 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/favicon-32x32.png - - +2024-08-24 20:49:17.633 +03:00 [DBG] No candidates found for the request path '/swagger/favicon-32x32.png' +2024-08-24 20:49:17.638 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:49:17.644 +03:00 [INF] Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A' +2024-08-24 20:49:17.663 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/favicon-32x32.png - - - 200 628 image/png 36.8588ms +2024-08-24 20:49:18.403 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 851.8234ms +2024-08-24 20:49:20.342 +03:00 [DBG] Connection id "0HN64CK7HI5QM" received FIN. +2024-08-24 20:49:20.346 +03:00 [DBG] Connection id "0HN64CK7HI5QM" is closed. The last processed stream ID was 3. +2024-08-24 20:49:20.351 +03:00 [DBG] Connection id "0HN64CK7HI5QM" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:20.367 +03:00 [DBG] Connection id "0HN64CK7HI5QM" stopped. +2024-08-24 20:49:20.514 +03:00 [DBG] Authentication of the HTTPS connection timed out. +2024-08-24 20:49:20.517 +03:00 [DBG] Connection id "0HN64CK7HI5QI" stopped. +2024-08-24 20:49:20.521 +03:00 [DBG] Connection id "0HN64CK7HI5QI" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:20.530 +03:00 [DBG] Authentication of the HTTPS connection timed out. +2024-08-24 20:49:20.532 +03:00 [DBG] Connection id "0HN64CK7HI5QJ" stopped. +2024-08-24 20:49:20.536 +03:00 [DBG] Connection id "0HN64CK7HI5QJ" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:39.915 +03:00 [DBG] Connection id "0HN64CK7HI5QN" accepted. +2024-08-24 20:49:39.926 +03:00 [DBG] Connection id "0HN64CK7HI5QN" started. +2024-08-24 20:49:39.936 +03:00 [DBG] Connection 0HN64CK7HI5QN established using the following protocol: "Tls13" +2024-08-24 20:49:39.956 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 20:49:39.980 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 20:49:40.006 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 20:49:40.012 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:49:40.017 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:49:40.025 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 20:49:40.273 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 20:49:40.284 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:49:40.393 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 20:49:40.400 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:49:40.405 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:49:40.410 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 20:49:40.414 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:49:40.417 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:49:40.422 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 20:49:41.262 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 20:49:41.449 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 20:49:41.471 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 20:49:41.480 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 20:49:41.487 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 20:49:41.532 +03:00 [DBG] Connection id "0HN64CK7HI5QN", Request id "0HN64CK7HI5QN:00000001": started reading request body. +2024-08-24 20:49:41.539 +03:00 [DBG] Connection id "0HN64CK7HI5QN", Request id "0HN64CK7HI5QN:00000001": done reading request body. +2024-08-24 20:49:41.621 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 20:49:41.627 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:49:41.633 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:49:41.638 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 20:49:41.847 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:49:44.380 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 20:49:44.386 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 20:49:44.392 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 20:49:44.398 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 20:49:44.403 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 20:49:44.720 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:49:44.727 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:49:44.732 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:49:44.864 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:49:44.869 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:49:44.876 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:49:45.505 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:49:45.982 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 20:49:46.262 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 20:49:47.291 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:49:47.493 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:49:47.674 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (185ms). +2024-08-24 20:49:47.734 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:49.296 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:49.351 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:49:49.635 +03:00 [INF] Executed DbCommand (292ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:49:49.845 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:49:50.026 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:49:50.093 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:49:50.135 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:49:50.161 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.191 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.394 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 20:49:50.441 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 20:49:50.450 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:49:50.453 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:49:50.459 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.467 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.471 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 20:49:50.496 +03:00 [INF] Executed DbCommand (25ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 20:49:50.509 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:49:50.511 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.517 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.560 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 20:49:50.616 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 20:49:50.626 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:49:50.631 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:49:50.636 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.645 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.660 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:49:50.716 +03:00 [INF] Executed DbCommand (56ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:49:50.735 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:49:50.743 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.746 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.793 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:49:50.796 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:49:50.801 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.805 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.810 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:49:50.827 +03:00 [INF] Executed DbCommand (17ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:49:50.833 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:49:50.835 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:50.840 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:49:51.292 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:49:51.307 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 20:49:51.310 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:49:51.312 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:49:51.316 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:49:51.321 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 20:49:51.468 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 11031.5323ms +2024-08-24 20:49:51.479 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:49:51.504 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:49:51.518 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 11562.5554ms +2024-08-24 20:49:55.381 +03:00 [DBG] Connection id "0HN64CK7HI5QN" received FIN. +2024-08-24 20:49:55.388 +03:00 [DBG] Connection id "0HN64CK7HI5QN" is closed. The last processed stream ID was 1. +2024-08-24 20:49:55.397 +03:00 [DBG] Connection id "0HN64CK7HI5QN" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:49:55.411 +03:00 [DBG] Connection id "0HN64CK7HI5QN" stopped. +2024-08-24 20:50:25.128 +03:00 [DBG] Connection id "0HN64CK7HI5QO" accepted. +2024-08-24 20:50:25.185 +03:00 [DBG] Connection id "0HN64CK7HI5QO" started. +2024-08-24 20:50:25.224 +03:00 [DBG] Connection 0HN64CK7HI5QO established using the following protocol: "Tls13" +2024-08-24 20:50:25.234 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 +2024-08-24 20:50:25.257 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/create' +2024-08-24 20:50:25.264 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/create' is valid for the request path '/api/Booking/create' +2024-08-24 20:50:25.268 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:50:25.271 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:50:25.273 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 20:50:25.588 +03:00 [DBG] Successfully validated the token. +2024-08-24 20:50:25.596 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 20:50:25.600 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:50:25.615 +03:00 [INF] Route matched with {action = "CreateBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] CreateBooking(HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 20:50:25.621 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:50:25.628 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:50:25.634 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 20:50:25.642 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:50:25.648 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:50:25.654 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 20:50:26.438 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 20:50:26.445 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 20:50:26.450 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' using the name '' in request data ... +2024-08-24 20:50:26.456 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 20:50:26.473 +03:00 [DBG] Connection id "0HN64CK7HI5QO", Request id "0HN64CK7HI5QO:00000001": started reading request body. +2024-08-24 20:50:26.479 +03:00 [DBG] Connection id "0HN64CK7HI5QO", Request id "0HN64CK7HI5QO:00000001": done reading request body. +2024-08-24 20:50:26.532 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' +2024-08-24 20:50:26.536 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:50:26.540 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:50:26.545 +03:00 [DBG] Attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 20:50:26.563 +03:00 [DBG] Done attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:50:26.714 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:50:26.724 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:26.728 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:50:26.732 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.737 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.742 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:50:26.769 +03:00 [INF] Executed DbCommand (27ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:50:26.778 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:26.783 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:26.787 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:26.793 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:26.796 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.800 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.831 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(r => r.RoomClass) + .FirstOrDefault(r => r.RoomID == __id_0)' +2024-08-24 20:50:26.882 +03:00 [DBG] Including navigation: 'Room.RoomClass'. +2024-08-24 20:50:26.917 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Room.AdultsCapacity (int) Required, 1], [Property: Room.ChildrenCapacity (int) Required, 2], [Property: Room.CreatedAtUtc (DateTime) Required, 3], [Property: Room.Number (string) Required MaxLength(50), 4], [Property: Room.PricePerNight (decimal) Required, 5], [Property: Room.RoomClassID (int) Required FK Index, 6] } + 1 -> Dictionary { [Property: RoomClass.RoomClassID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 7], [Property: RoomClass.CreatedAtUtc (DateTime) Required, 8], [Property: RoomClass.Description (string) MaxLength(500), 9], [Property: RoomClass.HotelId (int) Required FK Index, 10], [Property: RoomClass.Name (string) Required, 11], [Property: RoomClass.RoomType (RoomType) Required, 12] } + SELECT TOP(1) r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID, r0.RoomClassID, r0.CreatedAtUtc, r0.Description, r0.HotelId, r0.Name, r0.RoomType + FROM Rooms AS r + INNER JOIN RoomClasses AS r0 ON r.RoomClassID == r0.RoomClassID + WHERE r.RoomID == @__id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:50:26.924 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:26.928 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:50:26.933 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.937 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:26.945 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:26.966 +03:00 [INF] Executed DbCommand (25ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:27.020 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:27.107 +03:00 [DBG] Context 'AppDbContext' started tracking 'RoomClass' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:27.191 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:27.195 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.200 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.223 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:27.228 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:50:27.232 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.236 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.240 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:27.253 +03:00 [INF] Executed DbCommand (13ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:27.262 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:27.265 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.269 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.289 +03:00 [DBG] Compiling query expression: +'DbSet() + .Where(d => d.RoomID == __roomId_0 && d.StartDateUtc <= __checkInDate_1 && d.EndDateUtc >= __checkOutDate_2 && DateTime.UtcNow >= d.StartDateUtc && DateTime.UtcNow <= d.EndDateUtc) + .FirstOrDefault()' +2024-08-24 20:50:27.331 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + SELECT TOP(1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc + FROM Discounts AS d + WHERE ((((d.RoomID == @__roomId_0) && (d.StartDateUtc <= @__checkInDate_1)) && (d.EndDateUtc >= @__checkOutDate_2)) && (GETUTCDATE() >= d.StartDateUtc)) && (GETUTCDATE() <= d.EndDateUtc)), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:50:27.356 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:27.361 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:50:27.369 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.375 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.381 +03:00 [DBG] Executing DbCommand [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkInDate_1='?' (DbType = DateTime2), @__checkOutDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkInDate_1)) AND ([d].[EndDateUtc] >= @__checkOutDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 20:50:27.404 +03:00 [INF] Executed DbCommand (23ms) [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkInDate_1='?' (DbType = DateTime2), @__checkOutDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkInDate_1)) AND ([d].[EndDateUtc] >= @__checkOutDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 20:50:27.415 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:27.418 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.423 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.448 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(h => h.City) + .Include(h => h.Owner) + .Include(h => h.Reviews) + .AsSplitQuery() + .FirstOrDefault(h => h.HotelId == __id_0)' +2024-08-24 20:50:27.455 +03:00 [DBG] Including navigation: 'Hotel.City'. +2024-08-24 20:50:27.464 +03:00 [DBG] Including navigation: 'Hotel.Owner'. +2024-08-24 20:50:27.471 +03:00 [DBG] Including navigation: 'Hotel.Reviews'. +2024-08-24 20:50:27.558 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SplitQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Hotel.HotelId (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Hotel.CityID (int) Required FK Index, 1], [Property: Hotel.CreatedAtUtc (DateTime) Required, 2], [Property: Hotel.Description (string) MaxLength(500), 3], [Property: Hotel.Name (string) Required MaxLength(100), 4], [Property: Hotel.OwnerID (int) Required FK Index, 5], [Property: Hotel.PhoneNumber (string) Required MaxLength(15), 6], [Property: Hotel.StarRating (int) Required, 7] } + 1 -> Dictionary { [Property: City.CityID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: City.Country (string) Required, 9], [Property: City.CreatedAtUtc (DateTime) Required, 10], [Property: City.Description (string) Required, 11], [Property: City.Name (string) Required, 12], [Property: City.PostOffice (string) Required, 13], [Property: City.VisitCount (int) Required, 14] } + 2 -> Dictionary { [Property: Owner.OwnerID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 15], [Property: Owner.Email (string) Required, 16], [Property: Owner.FirstName (string) Required, 17], [Property: Owner.LastName (string) Required, 18], [Property: Owner.PhoneNumber (string) Required, 19] } + 3 -> 0 + 4 -> 8 + 5 -> 15 + SELECT TOP(1) h.HotelId, h.CityID, h.CreatedAtUtc, h.Description, h.Name, h.OwnerID, h.PhoneNumber, h.StarRating, c.CityID, c.Country, c.CreatedAtUtc, c.Description, c.Name, c.PostOffice, c.VisitCount, o.OwnerID, o.Email, o.FirstName, o.LastName, o.PhoneNumber + FROM Hotels AS h + INNER JOIN Cities AS c ON h.CityID == c.CityID + INNER JOIN owners AS o ON h.OwnerID == o.OwnerID + WHERE h.HotelId == @__id_0 + ORDER BY h.HotelId ASC, c.CityID ASC, o.OwnerID ASC), + Func, + null, + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:50:27.590 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:27.594 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:50:27.599 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.604 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:27.609 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 20:50:27.635 +03:00 [INF] Executed DbCommand (26ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 20:50:27.761 +03:00 [DBG] Context 'AppDbContext' started tracking 'Hotel' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:27.802 +03:00 [DBG] Context 'AppDbContext' started tracking 'City' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:27.846 +03:00 [DBG] Context 'AppDbContext' started tracking 'Owner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:27.928 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:27.932 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:50:27.938 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 20:50:27.966 +03:00 [INF] Executed DbCommand (27ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 20:50:27.996 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:27.999 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:28.002 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.006 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.012 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:28.015 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:50:28.019 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.023 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.028 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:28.042 +03:00 [INF] Executed DbCommand (14ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:50:28.049 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:28.052 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.056 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.229 +03:00 [DBG] 'AppDbContext' generated a temporary value for the property 'BookingID.Booking'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:28.350 +03:00 [DBG] Context 'AppDbContext' started tracking 'Booking' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:28.392 +03:00 [DBG] Context 'AppDbContext' started tracking 'BookingRoom' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:28.418 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 20:50:28.431 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 20:50:28.566 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 20:50:28.629 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.635 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:28.646 +03:00 [DBG] Beginning transaction with isolation level 'Unspecified'. +2024-08-24 20:50:28.701 +03:00 [DBG] Began transaction with isolation level 'ReadCommitted'. +2024-08-24 20:50:28.895 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:28.899 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:50:28.919 +03:00 [DBG] Executing DbCommand [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 20:50:28.955 +03:00 [INF] Executed DbCommand (36ms) [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 20:50:29.036 +03:00 [DBG] The foreign key property 'Booking.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 20:50:29.069 +03:00 [DBG] The foreign key property 'BookingRoom.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 20:50:29.086 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:29.094 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:50:29.097 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:50:29.101 +03:00 [DBG] Executing DbCommand [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 20:50:29.118 +03:00 [INF] Executed DbCommand (16ms) [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 20:50:29.125 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:50:29.146 +03:00 [DBG] Committing transaction. +2024-08-24 20:50:29.167 +03:00 [DBG] Committed transaction. +2024-08-24 20:50:29.182 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:29.188 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:50:29.212 +03:00 [DBG] Disposing transaction. +2024-08-24 20:50:29.270 +03:00 [DBG] An entity of type 'Booking' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:29.278 +03:00 [DBG] An entity of type 'BookingRoom' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:50:29.295 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 2 entities written to the database. +2024-08-24 20:50:29.303 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 20:50:29.307 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 20:50:29.311 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 20:50:29.316 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 0 entities written to the database. +2024-08-24 20:50:29.363 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:50:29.373 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 20:50:29.376 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:50:29.379 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:50:29.381 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:50:29.386 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.DTOs.Booking.BookingDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 20:50:29.444 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API) in 3789.9661ms +2024-08-24 20:50:29.450 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:50:29.454 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:50:29.458 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 - 200 - application/json;+charset=utf-8 4224.5799ms +2024-08-24 20:50:35.423 +03:00 [DBG] Connection id "0HN64CK7HI5QO" received FIN. +2024-08-24 20:50:35.430 +03:00 [DBG] Connection id "0HN64CK7HI5QO" is closed. The last processed stream ID was 1. +2024-08-24 20:50:35.438 +03:00 [DBG] Connection id "0HN64CK7HI5QO" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:50:35.462 +03:00 [DBG] Connection id "0HN64CK7HI5QO" stopped. +2024-08-24 20:55:01.426 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 20:55:01.768 +03:00 [DBG] Hosting starting +2024-08-24 20:55:01.871 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 20:55:01.881 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 20:55:01.929 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 20:55:01.934 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 20:55:01.939 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 20:55:01.967 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 20:55:01.993 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 20:55:01.997 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 20:55:02.001 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 20:55:02.027 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 20:55:02.039 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 20:55:02.051 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 20:55:02.057 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 20:55:02.076 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 20:55:02.091 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 20:55:02.106 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 20:55:02.111 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 20:55:02.653 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 20:55:02.823 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 20:55:02.826 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 20:55:02.829 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 20:55:02.832 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 20:55:02.835 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 20:55:02.838 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 20:55:02.840 +03:00 [INF] Hosting environment: Development +2024-08-24 20:55:02.843 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 20:55:02.845 +03:00 [DBG] Connection id "0HN64CNGIR1TP" accepted. +2024-08-24 20:55:02.846 +03:00 [DBG] Hosting started +2024-08-24 20:55:02.853 +03:00 [DBG] Connection id "0HN64CNGIR1TP" started. +2024-08-24 20:55:02.858 +03:00 [DBG] Connection id "0HN64CNGIR1TP" received FIN. +2024-08-24 20:55:02.904 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 20:55:03.331 +03:00 [DBG] Connection id "0HN64CNGIR1TP" stopped. +2024-08-24 20:55:03.341 +03:00 [DBG] Connection id "0HN64CNGIR1TP" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:55:05.720 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" accepted. +2024-08-24 20:55:05.723 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" started. +2024-08-24 20:55:05.852 +03:00 [DBG] Connection 0HN64CNGIR1TQ established using the following protocol: "Tls13" +2024-08-24 20:55:06.009 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 20:55:06.414 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 20:55:06.508 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 20:55:06.514 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:55:07.136 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 20:55:07.203 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 20:55:07.230 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 1235.4188ms +2024-08-24 20:55:07.233 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 20:55:07.252 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 18.5018ms +2024-08-24 20:55:07.300 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 20:55:07.467 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 167.4775ms +2024-08-24 20:55:10.289 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 20:55:10.310 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 20:55:10.314 +03:00 [DBG] Request did not match any endpoints +2024-08-24 20:55:11.203 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 913.9887ms +2024-08-24 20:55:15.785 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" received FIN. +2024-08-24 20:55:15.837 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" is closed. The last processed stream ID was 7. +2024-08-24 20:55:15.856 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:55:15.881 +03:00 [DBG] Connection id "0HN64CNGIR1TQ" stopped. +2024-08-24 20:55:23.493 +03:00 [DBG] Connection id "0HN64CNGIR1TR" accepted. +2024-08-24 20:55:23.497 +03:00 [DBG] Connection id "0HN64CNGIR1TR" started. +2024-08-24 20:55:23.540 +03:00 [DBG] Connection 0HN64CNGIR1TR established using the following protocol: "Tls13" +2024-08-24 20:55:23.548 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/api/Discount/60 - - +2024-08-24 20:55:23.576 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Discount/60' +2024-08-24 20:55:23.600 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API)' with route pattern 'api/Discount/{id}' is valid for the request path '/api/Discount/60' +2024-08-24 20:55:23.607 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API)' +2024-08-24 20:55:23.619 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:55:23.800 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 20:55:23.812 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API)' +2024-08-24 20:55:23.931 +03:00 [INF] Route matched with {action = "GetDiscountById", controller = "Discount"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] GetDiscountById(Int32) on controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API). +2024-08-24 20:55:23.940 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:55:23.946 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:55:23.952 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 20:55:23.960 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:55:23.965 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:55:23.971 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API) +2024-08-24 20:55:24.553 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 20:55:25.393 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API) +2024-08-24 20:55:25.414 +03:00 [DBG] Attempting to bind parameter 'id' of type 'System.Int32' ... +2024-08-24 20:55:25.423 +03:00 [DBG] Attempting to bind parameter 'id' of type 'System.Int32' using the name 'id' in request data ... +2024-08-24 20:55:25.430 +03:00 [DBG] Done attempting to bind parameter 'id' of type 'System.Int32'. +2024-08-24 20:55:25.434 +03:00 [DBG] Done attempting to bind parameter 'id' of type 'System.Int32'. +2024-08-24 20:55:25.439 +03:00 [DBG] Attempting to validate the bound parameter 'id' of type 'System.Int32' ... +2024-08-24 20:55:25.525 +03:00 [DBG] Done attempting to validate the bound parameter 'id' of type 'System.Int32'. +2024-08-24 20:55:28.076 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 20:55:28.081 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 20:55:28.085 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 20:55:28.091 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 20:55:28.096 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 20:55:28.443 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:55:28.449 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:55:28.453 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 20:55:28.574 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:55:28.579 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:55:28.583 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 20:55:29.155 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:55:29.523 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(d => d.Room) + .FirstOrDefault(d => d.DiscountID == __id_0)' +2024-08-24 20:55:30.026 +03:00 [DBG] Including navigation: 'Discount.Room'. +2024-08-24 20:55:30.832 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + 1 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: Room.AdultsCapacity (int) Required, 9], [Property: Room.ChildrenCapacity (int) Required, 10], [Property: Room.CreatedAtUtc (DateTime) Required, 11], [Property: Room.Number (string) Required MaxLength(50), 12], [Property: Room.PricePerNight (decimal) Required, 13], [Property: Room.RoomClassID (int) Required FK Index, 14] } + SELECT TOP(1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc, r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID + FROM Discounts AS d + INNER JOIN Rooms AS r ON d.RoomID == r.RoomID + WHERE d.DiscountID == @__id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:55:31.092 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:55:31.232 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (139ms). +2024-08-24 20:55:31.310 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:32.343 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:32.403 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc], [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID] +FROM [Discounts] AS [d] +INNER JOIN [Rooms] AS [r] ON [d].[RoomID] = [r].[RoomID] +WHERE [d].[DiscountID] = @__id_0 +2024-08-24 20:55:32.466 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/api/Discount/top-discounts?topN=5 - - +2024-08-24 20:55:32.475 +03:00 [DBG] 2 candidate(s) found for the request path '/api/Discount/top-discounts' +2024-08-24 20:55:32.478 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetRoomsWithHighestDiscountsAsync (HotelBookingPlatform.API)' with route pattern 'api/Discount/top-discounts' is valid for the request path '/api/Discount/top-discounts' +2024-08-24 20:55:32.482 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API)' with route pattern 'api/Discount/{id}' is valid for the request path '/api/Discount/top-discounts' +2024-08-24 20:55:32.487 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetRoomsWithHighestDiscountsAsync (HotelBookingPlatform.API)' +2024-08-24 20:55:32.491 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:55:32.494 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 20:55:32.498 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetRoomsWithHighestDiscountsAsync (HotelBookingPlatform.API)' +2024-08-24 20:55:32.515 +03:00 [INF] Route matched with {action = "GetRoomsWithHighestDiscounts", controller = "Discount"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] GetRoomsWithHighestDiscountsAsync(Int32) on controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API). +2024-08-24 20:55:32.523 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:55:32.527 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:55:32.531 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 20:55:32.541 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:55:32.545 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:55:32.549 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API) +2024-08-24 20:55:32.561 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.DiscountController (HotelBookingPlatform.API) +2024-08-24 20:55:32.618 +03:00 [DBG] Attempting to bind parameter 'topN' of type 'System.Int32' ... +2024-08-24 20:55:32.625 +03:00 [DBG] Attempting to bind parameter 'topN' of type 'System.Int32' using the name 'topN' in request data ... +2024-08-24 20:55:32.632 +03:00 [DBG] Done attempting to bind parameter 'topN' of type 'System.Int32'. +2024-08-24 20:55:32.636 +03:00 [DBG] Done attempting to bind parameter 'topN' of type 'System.Int32'. +2024-08-24 20:55:32.642 +03:00 [DBG] Attempting to validate the bound parameter 'topN' of type 'System.Int32' ... +2024-08-24 20:55:32.646 +03:00 [DBG] Done attempting to validate the bound parameter 'topN' of type 'System.Int32'. +2024-08-24 20:55:32.663 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:55:32.696 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(r => r.Room) + .Where(d => d.StartDateUtc <= __now_0 && d.EndDateUtc >= __now_0) + .OrderByDescending(d => d.Percentage) + .Take(__p_1)' +2024-08-24 20:55:32.711 +03:00 [DBG] Including navigation: 'Discount.Room'. +2024-08-24 20:55:32.809 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + 1 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: Room.AdultsCapacity (int) Required, 9], [Property: Room.ChildrenCapacity (int) Required, 10], [Property: Room.CreatedAtUtc (DateTime) Required, 11], [Property: Room.Number (string) Required MaxLength(50), 12], [Property: Room.PricePerNight (decimal) Required, 13], [Property: Room.RoomClassID (int) Required FK Index, 14] } + SELECT t.DiscountID, t.CreatedAtUtc, t.EndDateUtc, t.IsActive, t.Percentage, t.RoomClassID, t.RoomID, t.StartDateUtc, r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID + FROM + ( + SELECT TOP(@__p_1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc + FROM Discounts AS d + WHERE (d.StartDateUtc <= @__now_0) && (d.EndDateUtc >= @__now_0) + ORDER BY d.Percentage DESC + ) AS t + INNER JOIN Rooms AS r ON t.RoomID == r.RoomID + ORDER BY t.Percentage DESC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 20:55:32.814 +03:00 [INF] Executed DbCommand (423ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc], [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID] +FROM [Discounts] AS [d] +INNER JOIN [Rooms] AS [r] ON [d].[RoomID] = [r].[RoomID] +WHERE [d].[DiscountID] = @__id_0 +2024-08-24 20:55:32.826 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:55:32.831 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:55:32.838 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:32.871 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:32.884 +03:00 [DBG] Executing DbCommand [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[DiscountID], [t].[CreatedAtUtc], [t].[EndDateUtc], [t].[IsActive], [t].[Percentage], [t].[RoomClassID], [t].[RoomID], [t].[StartDateUtc], [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID] +FROM ( + SELECT TOP(@__p_1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] + FROM [Discounts] AS [d] + WHERE ([d].[StartDateUtc] <= @__now_0) AND ([d].[EndDateUtc] >= @__now_0) + ORDER BY [d].[Percentage] DESC +) AS [t] +INNER JOIN [Rooms] AS [r] ON [t].[RoomID] = [r].[RoomID] +ORDER BY [t].[Percentage] DESC +2024-08-24 20:55:32.914 +03:00 [INF] Executed DbCommand (30ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[DiscountID], [t].[CreatedAtUtc], [t].[EndDateUtc], [t].[IsActive], [t].[Percentage], [t].[RoomClassID], [t].[RoomID], [t].[StartDateUtc], [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID] +FROM ( + SELECT TOP(@__p_1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] + FROM [Discounts] AS [d] + WHERE ([d].[StartDateUtc] <= @__now_0) AND ([d].[EndDateUtc] >= @__now_0) + ORDER BY [d].[Percentage] DESC +) AS [t] +INNER JOIN [Rooms] AS [r] ON [t].[RoomID] = [r].[RoomID] +ORDER BY [t].[Percentage] DESC +2024-08-24 20:55:33.061 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.061 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.209 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.209 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.305 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.312 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.315 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.320 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.325 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.329 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.334 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.339 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:55:33.349 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:55:33.349 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:55:33.374 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:33.374 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:33.410 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:33.410 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:55:33.480 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:55:33.489 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:55:33.499 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 20:55:33.501 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:55:33.501 +03:00 [DBG] Attempting to select an output formatter based on Accept header '["text/plain"]'. +2024-08-24 20:55:33.503 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:55:33.511 +03:00 [DBG] Could not find an output formatter based on content negotiation. Accepted types were (["text/plain"]) +2024-08-24 20:55:33.514 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:55:33.516 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:55:33.520 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.DTOs.Discount.DiscountDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 20:55:33.522 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:55:33.530 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:55:33.534 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Generic.List`1[[HotelBookingPlatform.Domain.DTOs.Discount.DiscountDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2024-08-24 20:55:33.662 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API) in 9676.5816ms +2024-08-24 20:55:33.662 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.DiscountController.GetRoomsWithHighestDiscountsAsync (HotelBookingPlatform.API) in 1097.1274ms +2024-08-24 20:55:33.674 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetDiscountById (HotelBookingPlatform.API)' +2024-08-24 20:55:33.674 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.DiscountController.GetRoomsWithHighestDiscountsAsync (HotelBookingPlatform.API)' +2024-08-24 20:55:33.710 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:55:33.710 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:55:33.729 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/api/Discount/top-discounts?topN=5 - - - 200 - application/json;+charset=utf-8 1262.4990ms +2024-08-24 20:55:33.729 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/api/Discount/60 - - - 200 - application/json;+charset=utf-8 10180.9989ms +2024-08-24 20:55:35.803 +03:00 [DBG] Connection id "0HN64CNGIR1TR" received FIN. +2024-08-24 20:55:35.807 +03:00 [DBG] Connection id "0HN64CNGIR1TR" is closed. The last processed stream ID was 3. +2024-08-24 20:55:35.813 +03:00 [DBG] Connection id "0HN64CNGIR1TR" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:55:35.836 +03:00 [DBG] Connection id "0HN64CNGIR1TR" stopped. +2024-08-24 20:59:00.950 +03:00 [DBG] Connection id "0HN64CNGIR1TS" accepted. +2024-08-24 20:59:00.961 +03:00 [DBG] Connection id "0HN64CNGIR1TS" started. +2024-08-24 20:59:00.985 +03:00 [DBG] Connection 0HN64CNGIR1TS established using the following protocol: "Tls13" +2024-08-24 20:59:01.012 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 20:59:01.015 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 20:59:01.018 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 20:59:01.023 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:59:01.026 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:59:01.038 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 20:59:01.045 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 20:59:01.048 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:59:01.065 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 20:59:01.071 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:59:01.077 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:59:01.081 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 20:59:01.088 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:59:01.094 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:59:01.099 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 20:59:01.145 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 20:59:01.149 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 20:59:01.157 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 20:59:01.163 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 20:59:01.207 +03:00 [DBG] Connection id "0HN64CNGIR1TS", Request id "0HN64CNGIR1TS:00000001": started reading request body. +2024-08-24 20:59:01.215 +03:00 [DBG] Connection id "0HN64CNGIR1TS", Request id "0HN64CNGIR1TS:00000001": done reading request body. +2024-08-24 20:59:01.299 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 20:59:01.304 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:59:01.311 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:59:01.316 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 20:59:01.336 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 20:59:01.510 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:59:01.524 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 20:59:01.530 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 20:59:01.776 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:59:01.813 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:01.818 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 20:59:01.826 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:01.835 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:01.840 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:59:01.880 +03:00 [INF] Executed DbCommand (40ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:59:01.951 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:02.076 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:02.144 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:02.151 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:02.154 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.158 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.278 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 20:59:02.313 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 20:59:02.321 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:02.325 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:02.329 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.334 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.339 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 20:59:02.358 +03:00 [INF] Executed DbCommand (18ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 20:59:02.366 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:02.369 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.374 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.426 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 20:59:02.455 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 20:59:02.461 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:02.465 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:02.469 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.474 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.478 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:59:02.497 +03:00 [INF] Executed DbCommand (20ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:59:02.508 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:02.511 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.515 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.569 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:02.574 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 20:59:02.579 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.583 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.588 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:59:02.610 +03:00 [INF] Executed DbCommand (22ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 20:59:02.618 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:02.621 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:02.626 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:03.094 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:59:03.103 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 20:59:03.106 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:59:03.109 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:59:03.111 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:59:03.116 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 20:59:03.157 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 2057.9469ms +2024-08-24 20:59:03.161 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 20:59:03.167 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:59:03.175 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 2163.6320ms +2024-08-24 20:59:06.070 +03:00 [DBG] Connection id "0HN64CNGIR1TS" received FIN. +2024-08-24 20:59:06.076 +03:00 [DBG] Connection id "0HN64CNGIR1TS" is closed. The last processed stream ID was 1. +2024-08-24 20:59:06.082 +03:00 [DBG] Connection id "0HN64CNGIR1TS" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:59:06.095 +03:00 [DBG] Connection id "0HN64CNGIR1TS" stopped. +2024-08-24 20:59:37.641 +03:00 [DBG] Connection id "0HN64CNGIR1TT" accepted. +2024-08-24 20:59:37.650 +03:00 [DBG] Connection id "0HN64CNGIR1TT" started. +2024-08-24 20:59:37.717 +03:00 [DBG] Connection 0HN64CNGIR1TT established using the following protocol: "Tls13" +2024-08-24 20:59:37.728 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 +2024-08-24 20:59:37.754 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/create' +2024-08-24 20:59:37.760 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/create' is valid for the request path '/api/Booking/create' +2024-08-24 20:59:37.764 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:59:37.767 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 20:59:37.768 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 20:59:38.060 +03:00 [DBG] Successfully validated the token. +2024-08-24 20:59:38.065 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 20:59:38.070 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:59:38.081 +03:00 [INF] Route matched with {action = "CreateBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] CreateBooking(HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 20:59:38.088 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 20:59:38.093 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 20:59:38.098 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 20:59:38.106 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 20:59:38.112 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 20:59:38.117 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 20:59:38.126 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 20:59:38.131 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 20:59:38.135 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' using the name '' in request data ... +2024-08-24 20:59:38.141 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 20:59:38.159 +03:00 [DBG] Connection id "0HN64CNGIR1TT", Request id "0HN64CNGIR1TT:00000001": started reading request body. +2024-08-24 20:59:38.164 +03:00 [DBG] Connection id "0HN64CNGIR1TT", Request id "0HN64CNGIR1TT:00000001": done reading request body. +2024-08-24 20:59:38.213 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' +2024-08-24 20:59:38.217 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:59:38.222 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:59:38.227 +03:00 [DBG] Attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 20:59:38.242 +03:00 [DBG] Done attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 20:59:38.259 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 20:59:38.267 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:38.271 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:38.277 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.281 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.285 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:59:38.305 +03:00 [INF] Executed DbCommand (20ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 20:59:38.313 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:38.318 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:38.323 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:38.327 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:38.329 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.333 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.344 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(r => r.RoomClass) + .FirstOrDefault(r => r.RoomID == __id_0)' +2024-08-24 20:59:38.350 +03:00 [DBG] Including navigation: 'Room.RoomClass'. +2024-08-24 20:59:38.367 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Room.AdultsCapacity (int) Required, 1], [Property: Room.ChildrenCapacity (int) Required, 2], [Property: Room.CreatedAtUtc (DateTime) Required, 3], [Property: Room.Number (string) Required MaxLength(50), 4], [Property: Room.PricePerNight (decimal) Required, 5], [Property: Room.RoomClassID (int) Required FK Index, 6] } + 1 -> Dictionary { [Property: RoomClass.RoomClassID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 7], [Property: RoomClass.CreatedAtUtc (DateTime) Required, 8], [Property: RoomClass.Description (string) MaxLength(500), 9], [Property: RoomClass.HotelId (int) Required FK Index, 10], [Property: RoomClass.Name (string) Required, 11], [Property: RoomClass.RoomType (RoomType) Required, 12] } + SELECT TOP(1) r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID, r0.RoomClassID, r0.CreatedAtUtc, r0.Description, r0.HotelId, r0.Name, r0.RoomType + FROM Rooms AS r + INNER JOIN RoomClasses AS r0 ON r.RoomClassID == r0.RoomClassID + WHERE r.RoomID == @__id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:59:38.374 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:38.378 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:38.382 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.387 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.392 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:38.416 +03:00 [INF] Executed DbCommand (24ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:38.423 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:38.444 +03:00 [DBG] Context 'AppDbContext' started tracking 'RoomClass' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:38.482 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:38.485 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.490 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.509 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:38.513 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:38.517 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.521 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.527 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:38.549 +03:00 [INF] Executed DbCommand (22ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:38.557 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:38.560 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.565 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.580 +03:00 [DBG] Compiling query expression: +'DbSet() + .Where(d => d.RoomID == __roomId_0 && d.StartDateUtc <= __checkInDate_1 && d.EndDateUtc >= __checkOutDate_2 && DateTime.UtcNow >= d.StartDateUtc && DateTime.UtcNow <= d.EndDateUtc) + .FirstOrDefault()' +2024-08-24 20:59:38.629 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + SELECT TOP(1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc + FROM Discounts AS d + WHERE ((((d.RoomID == @__roomId_0) && (d.StartDateUtc <= @__checkInDate_1)) && (d.EndDateUtc >= @__checkOutDate_2)) && (GETUTCDATE() >= d.StartDateUtc)) && (GETUTCDATE() <= d.EndDateUtc)), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:59:38.644 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:38.647 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 20:59:38.653 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.657 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.662 +03:00 [DBG] Executing DbCommand [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkInDate_1='?' (DbType = DateTime2), @__checkOutDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkInDate_1)) AND ([d].[EndDateUtc] >= @__checkOutDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 20:59:38.680 +03:00 [INF] Executed DbCommand (18ms) [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkInDate_1='?' (DbType = DateTime2), @__checkOutDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkInDate_1)) AND ([d].[EndDateUtc] >= @__checkOutDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 20:59:38.687 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:38.690 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.694 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.711 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(h => h.City) + .Include(h => h.Owner) + .Include(h => h.Reviews) + .AsSplitQuery() + .FirstOrDefault(h => h.HotelId == __id_0)' +2024-08-24 20:59:38.721 +03:00 [DBG] Including navigation: 'Hotel.City'. +2024-08-24 20:59:38.728 +03:00 [DBG] Including navigation: 'Hotel.Owner'. +2024-08-24 20:59:38.735 +03:00 [DBG] Including navigation: 'Hotel.Reviews'. +2024-08-24 20:59:38.858 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SplitQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Hotel.HotelId (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Hotel.CityID (int) Required FK Index, 1], [Property: Hotel.CreatedAtUtc (DateTime) Required, 2], [Property: Hotel.Description (string) MaxLength(500), 3], [Property: Hotel.Name (string) Required MaxLength(100), 4], [Property: Hotel.OwnerID (int) Required FK Index, 5], [Property: Hotel.PhoneNumber (string) Required MaxLength(15), 6], [Property: Hotel.StarRating (int) Required, 7] } + 1 -> Dictionary { [Property: City.CityID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: City.Country (string) Required, 9], [Property: City.CreatedAtUtc (DateTime) Required, 10], [Property: City.Description (string) Required, 11], [Property: City.Name (string) Required, 12], [Property: City.PostOffice (string) Required, 13], [Property: City.VisitCount (int) Required, 14] } + 2 -> Dictionary { [Property: Owner.OwnerID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 15], [Property: Owner.Email (string) Required, 16], [Property: Owner.FirstName (string) Required, 17], [Property: Owner.LastName (string) Required, 18], [Property: Owner.PhoneNumber (string) Required, 19] } + 3 -> 0 + 4 -> 8 + 5 -> 15 + SELECT TOP(1) h.HotelId, h.CityID, h.CreatedAtUtc, h.Description, h.Name, h.OwnerID, h.PhoneNumber, h.StarRating, c.CityID, c.Country, c.CreatedAtUtc, c.Description, c.Name, c.PostOffice, c.VisitCount, o.OwnerID, o.Email, o.FirstName, o.LastName, o.PhoneNumber + FROM Hotels AS h + INNER JOIN Cities AS c ON h.CityID == c.CityID + INNER JOIN owners AS o ON h.OwnerID == o.OwnerID + WHERE h.HotelId == @__id_0 + ORDER BY h.HotelId ASC, c.CityID ASC, o.OwnerID ASC), + Func, + null, + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 20:59:38.892 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:38.898 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 20:59:38.903 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.909 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:38.915 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 20:59:38.955 +03:00 [INF] Executed DbCommand (40ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 20:59:39.073 +03:00 [DBG] Context 'AppDbContext' started tracking 'Hotel' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.127 +03:00 [DBG] Context 'AppDbContext' started tracking 'City' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.162 +03:00 [DBG] Context 'AppDbContext' started tracking 'Owner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.214 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:39.221 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (6ms). +2024-08-24 20:59:39.227 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 20:59:39.256 +03:00 [INF] Executed DbCommand (29ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 20:59:39.295 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:39.299 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:39.301 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.306 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.314 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:39.319 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:59:39.324 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.330 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.335 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:39.352 +03:00 [INF] Executed DbCommand (17ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 20:59:39.361 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:39.364 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.369 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.489 +03:00 [DBG] 'AppDbContext' generated a temporary value for the property 'BookingID.Booking'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.636 +03:00 [DBG] Context 'AppDbContext' started tracking 'Booking' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.666 +03:00 [DBG] Context 'AppDbContext' started tracking 'BookingRoom' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:39.693 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 20:59:39.702 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 20:59:39.881 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 20:59:39.945 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.951 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:39.961 +03:00 [DBG] Beginning transaction with isolation level 'Unspecified'. +2024-08-24 20:59:39.994 +03:00 [DBG] Began transaction with isolation level 'ReadCommitted'. +2024-08-24 20:59:40.184 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:40.190 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (6ms). +2024-08-24 20:59:40.213 +03:00 [DBG] Executing DbCommand [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 20:59:40.245 +03:00 [INF] Executed DbCommand (32ms) [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 20:59:40.315 +03:00 [DBG] The foreign key property 'Booking.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 20:59:40.344 +03:00 [DBG] The foreign key property 'BookingRoom.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 20:59:40.361 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:40.369 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 20:59:40.373 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 20:59:40.379 +03:00 [DBG] Executing DbCommand [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 20:59:40.397 +03:00 [INF] Executed DbCommand (18ms) [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 20:59:40.406 +03:00 [DBG] A data reader was disposed. +2024-08-24 20:59:40.429 +03:00 [DBG] Committing transaction. +2024-08-24 20:59:40.450 +03:00 [DBG] Committed transaction. +2024-08-24 20:59:40.470 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:40.476 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 20:59:40.493 +03:00 [DBG] Disposing transaction. +2024-08-24 20:59:40.532 +03:00 [DBG] An entity of type 'Booking' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:40.539 +03:00 [DBG] An entity of type 'BookingRoom' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 20:59:40.555 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 2 entities written to the database. +2024-08-24 20:59:40.561 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 20:59:40.565 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 20:59:40.568 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 20:59:40.573 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 0 entities written to the database. +2024-08-24 20:59:40.591 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 20:59:40.601 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 20:59:40.604 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 20:59:40.607 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 20:59:40.611 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 20:59:40.616 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.DTOs.Booking.BookingDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 20:59:40.655 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API) in 2537.6447ms +2024-08-24 20:59:40.660 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 20:59:40.665 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 20:59:40.669 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 - 200 - application/json;+charset=utf-8 2940.5181ms +2024-08-24 20:59:46.143 +03:00 [DBG] Connection id "0HN64CNGIR1TT" received FIN. +2024-08-24 20:59:46.148 +03:00 [DBG] Connection id "0HN64CNGIR1TT" is closed. The last processed stream ID was 1. +2024-08-24 20:59:46.152 +03:00 [DBG] Connection id "0HN64CNGIR1TT" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 20:59:46.157 +03:00 [DBG] Connection id "0HN64CNGIR1TT" stopped. +2024-08-24 21:08:24.920 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 21:08:25.161 +03:00 [DBG] Hosting starting +2024-08-24 21:08:25.241 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 21:08:25.250 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 21:08:25.269 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 21:08:25.274 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 21:08:25.279 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 21:08:25.293 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 21:08:25.307 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 21:08:25.312 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 21:08:25.316 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 21:08:25.337 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 21:08:25.350 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:08:25.363 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 21:08:25.369 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:08:25.388 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 21:08:25.401 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 21:08:25.417 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 21:08:25.423 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 21:08:25.857 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 21:08:26.040 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 21:08:26.043 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 21:08:26.047 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 21:08:26.051 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 21:08:26.054 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 21:08:26.058 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 21:08:26.061 +03:00 [INF] Hosting environment: Development +2024-08-24 21:08:26.064 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 21:08:26.067 +03:00 [DBG] Hosting started +2024-08-24 21:08:26.412 +03:00 [DBG] Connection id "0HN64CV028H1K" accepted. +2024-08-24 21:08:26.420 +03:00 [DBG] Connection id "0HN64CV028H1K" started. +2024-08-24 21:08:26.424 +03:00 [DBG] Connection id "0HN64CV028H1K" received FIN. +2024-08-24 21:08:26.462 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:08:26.569 +03:00 [DBG] Connection id "0HN64CV028H1K" stopped. +2024-08-24 21:08:26.577 +03:00 [DBG] Connection id "0HN64CV028H1K" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:08:29.361 +03:00 [DBG] Connection id "0HN64CV028H1L" accepted. +2024-08-24 21:08:29.364 +03:00 [DBG] Connection id "0HN64CV028H1L" started. +2024-08-24 21:08:29.472 +03:00 [DBG] Connection 0HN64CV028H1L established using the following protocol: "Tls13" +2024-08-24 21:08:29.672 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 21:08:30.069 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 21:08:30.184 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 21:08:30.188 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:08:30.936 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 21:08:31.008 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 21:08:31.043 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 21:08:31.043 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 1385.1883ms +2024-08-24 21:08:31.059 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 16.6459ms +2024-08-24 21:08:31.087 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 21:08:31.304 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 217.5913ms +2024-08-24 21:08:31.891 +03:00 [DBG] Connection id "0HN64CV028H1L" received FIN. +2024-08-24 21:08:31.919 +03:00 [DBG] Connection id "0HN64CV028H1L" is closed. The last processed stream ID was 5. +2024-08-24 21:08:31.925 +03:00 [DBG] Connection id "0HN64CV028H1L" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:08:31.947 +03:00 [DBG] Connection id "0HN64CV028H1L" stopped. +2024-08-24 21:08:34.563 +03:00 [DBG] Connection id "0HN64CV028H1M" accepted. +2024-08-24 21:08:34.566 +03:00 [DBG] Connection id "0HN64CV028H1M" started. +2024-08-24 21:08:34.597 +03:00 [DBG] Connection 0HN64CV028H1M established using the following protocol: "Tls13" +2024-08-24 21:08:34.604 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 21:08:34.611 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 21:08:34.614 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:08:35.372 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 768.9392ms +2024-08-24 21:08:41.899 +03:00 [DBG] Connection id "0HN64CV028H1M" received FIN. +2024-08-24 21:08:41.903 +03:00 [DBG] Connection id "0HN64CV028H1M" is closed. The last processed stream ID was 1. +2024-08-24 21:08:41.908 +03:00 [DBG] Connection id "0HN64CV028H1M" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:08:41.915 +03:00 [DBG] Connection id "0HN64CV028H1M" stopped. +2024-08-24 21:09:21.318 +03:00 [DBG] Connection id "0HN64CV028H1N" accepted. +2024-08-24 21:09:21.332 +03:00 [DBG] Connection id "0HN64CV028H1N" started. +2024-08-24 21:09:21.361 +03:00 [DBG] Connection 0HN64CV028H1N established using the following protocol: "Tls13" +2024-08-24 21:09:21.376 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 21:09:21.416 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 21:09:21.441 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 21:09:21.447 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:09:21.454 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:09:21.459 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:09:21.641 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 21:09:21.653 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:09:21.745 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 21:09:21.755 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:09:21.760 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:09:21.765 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 21:09:21.773 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:09:21.779 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:09:21.785 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:09:22.444 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 21:09:22.630 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:09:22.649 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:09:22.659 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 21:09:22.666 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:09:22.702 +03:00 [DBG] Connection id "0HN64CV028H1N", Request id "0HN64CV028H1N:00000001": started reading request body. +2024-08-24 21:09:22.709 +03:00 [DBG] Connection id "0HN64CV028H1N", Request id "0HN64CV028H1N:00000001": done reading request body. +2024-08-24 21:09:22.797 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 21:09:22.803 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:09:22.808 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:09:22.813 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:09:22.904 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:09:25.502 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 21:09:25.509 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 21:09:25.514 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 21:09:25.520 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 21:09:25.527 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 21:09:25.982 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:09:25.989 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:09:25.994 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:09:26.159 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:09:26.164 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:09:26.168 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:09:26.978 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:09:27.473 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 21:09:27.800 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 21:09:28.898 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:09:29.126 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:09:29.286 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (166ms). +2024-08-24 21:09:29.344 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:30.406 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:30.463 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:09:30.791 +03:00 [INF] Executed DbCommand (346ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:09:31.014 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:09:31.227 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:09:31.330 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:09:31.378 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:09:31.405 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.436 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.577 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 21:09:31.617 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:09:31.626 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:09:31.629 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:09:31.633 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.642 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.646 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:09:31.689 +03:00 [INF] Executed DbCommand (43ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:09:31.715 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:09:31.718 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.724 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.782 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 21:09:31.864 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:09:31.873 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:09:31.877 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:09:31.881 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.886 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.889 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:09:31.930 +03:00 [INF] Executed DbCommand (41ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:09:31.939 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:09:31.942 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.946 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:31.999 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:09:32.003 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:09:32.009 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:32.014 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:32.020 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:09:32.044 +03:00 [INF] Executed DbCommand (24ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:09:32.054 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:09:32.057 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:32.063 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:09:32.516 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:09:32.534 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:09:32.537 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:09:32.540 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:09:32.545 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:09:32.551 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:09:32.696 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 10894.0447ms +2024-08-24 21:09:32.707 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:09:32.747 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:09:32.769 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 11393.2201ms +2024-08-24 21:09:41.965 +03:00 [DBG] Connection id "0HN64CV028H1N" received FIN. +2024-08-24 21:09:41.970 +03:00 [DBG] Connection id "0HN64CV028H1N" is closed. The last processed stream ID was 1. +2024-08-24 21:09:41.975 +03:00 [DBG] Connection id "0HN64CV028H1N" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:09:41.992 +03:00 [DBG] Connection id "0HN64CV028H1N" stopped. +2024-08-24 21:10:09.339 +03:00 [DBG] Connection id "0HN64CV028H1O" accepted. +2024-08-24 21:10:09.343 +03:00 [DBG] Connection id "0HN64CV028H1O" started. +2024-08-24 21:10:09.422 +03:00 [DBG] Connection 0HN64CV028H1O established using the following protocol: "Tls13" +2024-08-24 21:10:09.431 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 +2024-08-24 21:10:09.441 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/create' +2024-08-24 21:10:09.446 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/create' is valid for the request path '/api/Booking/create' +2024-08-24 21:10:09.452 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:10:09.455 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:10:09.458 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:10:09.742 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:10:09.749 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:10:09.754 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:10:09.766 +03:00 [INF] Route matched with {action = "CreateBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] CreateBooking(HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:10:09.774 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:10:09.779 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:10:09.784 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:10:09.791 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:10:09.796 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:10:09.801 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:10:10.498 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:10:10.505 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 21:10:10.511 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' using the name '' in request data ... +2024-08-24 21:10:10.518 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:10:10.539 +03:00 [DBG] Connection id "0HN64CV028H1O", Request id "0HN64CV028H1O:00000001": started reading request body. +2024-08-24 21:10:10.544 +03:00 [DBG] Connection id "0HN64CV028H1O", Request id "0HN64CV028H1O:00000001": done reading request body. +2024-08-24 21:10:10.592 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' +2024-08-24 21:10:10.596 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:10:10.602 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:10:10.607 +03:00 [DBG] Attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 21:10:10.629 +03:00 [DBG] Done attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:10:10.800 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:10:10.812 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:10.816 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:10:10.820 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:10.826 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:10.831 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:10:10.885 +03:00 [INF] Executed DbCommand (54ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:10:10.895 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:10.900 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:10.906 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:10.911 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:10.914 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:10.920 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:10.954 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(r => r.RoomClass) + .FirstOrDefault(r => r.RoomID == __id_0)' +2024-08-24 21:10:10.999 +03:00 [DBG] Including navigation: 'Room.RoomClass'. +2024-08-24 21:10:11.032 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Room.AdultsCapacity (int) Required, 1], [Property: Room.ChildrenCapacity (int) Required, 2], [Property: Room.CreatedAtUtc (DateTime) Required, 3], [Property: Room.Number (string) Required MaxLength(50), 4], [Property: Room.PricePerNight (decimal) Required, 5], [Property: Room.RoomClassID (int) Required FK Index, 6] } + 1 -> Dictionary { [Property: RoomClass.RoomClassID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 7], [Property: RoomClass.CreatedAtUtc (DateTime) Required, 8], [Property: RoomClass.Description (string) MaxLength(500), 9], [Property: RoomClass.HotelId (int) Required FK Index, 10], [Property: RoomClass.Name (string) Required, 11], [Property: RoomClass.RoomType (RoomType) Required, 12] } + SELECT TOP(1) r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID, r0.RoomClassID, r0.CreatedAtUtc, r0.Description, r0.HotelId, r0.Name, r0.RoomType + FROM Rooms AS r + INNER JOIN RoomClasses AS r0 ON r.RoomClassID == r0.RoomClassID + WHERE r.RoomID == @__id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:10:11.043 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:11.047 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:10:11.053 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.059 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.074 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:11.135 +03:00 [INF] Executed DbCommand (70ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:11.204 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:11.279 +03:00 [DBG] Context 'AppDbContext' started tracking 'RoomClass' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:11.377 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:11.379 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.384 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.406 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:11.410 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:10:11.414 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.420 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.426 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:11.468 +03:00 [INF] Executed DbCommand (42ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:11.478 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:11.480 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.484 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.497 +03:00 [DBG] Compiling query expression: +'DbSet() + .Where(d => d.RoomID == __roomId_0 && d.StartDateUtc <= __checkOutDate_1 && d.EndDateUtc >= __checkInDate_2 && DateTime.UtcNow >= d.StartDateUtc && DateTime.UtcNow <= d.EndDateUtc) + .FirstOrDefault()' +2024-08-24 21:10:11.543 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + SELECT TOP(1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc + FROM Discounts AS d + WHERE ((((d.RoomID == @__roomId_0) && (d.StartDateUtc <= @__checkOutDate_1)) && (d.EndDateUtc >= @__checkInDate_2)) && (GETUTCDATE() >= d.StartDateUtc)) && (GETUTCDATE() <= d.EndDateUtc)), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:10:11.564 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:11.567 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:10:11.576 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.580 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.585 +03:00 [DBG] Executing DbCommand [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkOutDate_1='?' (DbType = DateTime2), @__checkInDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkOutDate_1)) AND ([d].[EndDateUtc] >= @__checkInDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 21:10:11.626 +03:00 [INF] Executed DbCommand (41ms) [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkOutDate_1='?' (DbType = DateTime2), @__checkInDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkOutDate_1)) AND ([d].[EndDateUtc] >= @__checkInDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 21:10:11.645 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:11.689 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:11.692 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.697 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.710 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(h => h.City) + .Include(h => h.Owner) + .Include(h => h.Reviews) + .AsSplitQuery() + .FirstOrDefault(h => h.HotelId == __id_0)' +2024-08-24 21:10:11.717 +03:00 [DBG] Including navigation: 'Hotel.City'. +2024-08-24 21:10:11.724 +03:00 [DBG] Including navigation: 'Hotel.Owner'. +2024-08-24 21:10:11.729 +03:00 [DBG] Including navigation: 'Hotel.Reviews'. +2024-08-24 21:10:11.819 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SplitQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Hotel.HotelId (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Hotel.CityID (int) Required FK Index, 1], [Property: Hotel.CreatedAtUtc (DateTime) Required, 2], [Property: Hotel.Description (string) MaxLength(500), 3], [Property: Hotel.Name (string) Required MaxLength(100), 4], [Property: Hotel.OwnerID (int) Required FK Index, 5], [Property: Hotel.PhoneNumber (string) Required MaxLength(15), 6], [Property: Hotel.StarRating (int) Required, 7] } + 1 -> Dictionary { [Property: City.CityID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: City.Country (string) Required, 9], [Property: City.CreatedAtUtc (DateTime) Required, 10], [Property: City.Description (string) Required, 11], [Property: City.Name (string) Required, 12], [Property: City.PostOffice (string) Required, 13], [Property: City.VisitCount (int) Required, 14] } + 2 -> Dictionary { [Property: Owner.OwnerID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 15], [Property: Owner.Email (string) Required, 16], [Property: Owner.FirstName (string) Required, 17], [Property: Owner.LastName (string) Required, 18], [Property: Owner.PhoneNumber (string) Required, 19] } + 3 -> 0 + 4 -> 8 + 5 -> 15 + SELECT TOP(1) h.HotelId, h.CityID, h.CreatedAtUtc, h.Description, h.Name, h.OwnerID, h.PhoneNumber, h.StarRating, c.CityID, c.Country, c.CreatedAtUtc, c.Description, c.Name, c.PostOffice, c.VisitCount, o.OwnerID, o.Email, o.FirstName, o.LastName, o.PhoneNumber + FROM Hotels AS h + INNER JOIN Cities AS c ON h.CityID == c.CityID + INNER JOIN owners AS o ON h.OwnerID == o.OwnerID + WHERE h.HotelId == @__id_0 + ORDER BY h.HotelId ASC, c.CityID ASC, o.OwnerID ASC), + Func, + null, + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:10:11.865 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:11.870 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:10:11.875 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.879 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:11.884 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 21:10:11.932 +03:00 [INF] Executed DbCommand (48ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 21:10:12.074 +03:00 [DBG] Context 'AppDbContext' started tracking 'Hotel' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.142 +03:00 [DBG] Context 'AppDbContext' started tracking 'City' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.187 +03:00 [DBG] Context 'AppDbContext' started tracking 'Owner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.258 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:12.262 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:10:12.268 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 21:10:12.327 +03:00 [INF] Executed DbCommand (58ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 21:10:12.362 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:12.366 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:12.369 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.377 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.385 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:12.389 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:10:12.394 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.399 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.404 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:12.438 +03:00 [INF] Executed DbCommand (35ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:10:12.446 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:12.449 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.454 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:12.626 +03:00 [DBG] 'AppDbContext' generated a temporary value for the property 'BookingID.Booking'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.772 +03:00 [DBG] Context 'AppDbContext' started tracking 'Booking' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.813 +03:00 [DBG] Context 'AppDbContext' started tracking 'BookingRoom' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:12.846 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 21:10:12.862 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 21:10:13.059 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 21:10:13.147 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:13.152 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:13.165 +03:00 [DBG] Beginning transaction with isolation level 'Unspecified'. +2024-08-24 21:10:13.210 +03:00 [DBG] Began transaction with isolation level 'ReadCommitted'. +2024-08-24 21:10:13.399 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:13.403 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:10:13.429 +03:00 [DBG] Executing DbCommand [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 21:10:13.476 +03:00 [INF] Executed DbCommand (47ms) [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 21:10:13.566 +03:00 [DBG] The foreign key property 'Booking.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 21:10:13.591 +03:00 [DBG] The foreign key property 'BookingRoom.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 21:10:13.607 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:13.612 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:10:13.615 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:10:13.621 +03:00 [DBG] Executing DbCommand [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 21:10:13.643 +03:00 [INF] Executed DbCommand (22ms) [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 21:10:13.652 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:10:13.678 +03:00 [DBG] Committing transaction. +2024-08-24 21:10:13.706 +03:00 [DBG] Committed transaction. +2024-08-24 21:10:13.727 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:13.732 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:10:13.755 +03:00 [DBG] Disposing transaction. +2024-08-24 21:10:13.798 +03:00 [DBG] An entity of type 'Booking' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:13.806 +03:00 [DBG] An entity of type 'BookingRoom' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:10:13.823 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 2 entities written to the database. +2024-08-24 21:10:13.829 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 21:10:13.833 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 21:10:13.837 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 21:10:13.841 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 0 entities written to the database. +2024-08-24 21:10:13.891 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:10:13.900 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:10:13.903 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:10:13.906 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:10:13.910 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:10:13.915 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.DTOs.Booking.BookingDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:10:13.979 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API) in 4177.9657ms +2024-08-24 21:10:13.986 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:10:13.990 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:10:13.993 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/create application/json 161 - 200 - application/json;+charset=utf-8 4563.8280ms +2024-08-24 21:10:22.018 +03:00 [DBG] Connection id "0HN64CV028H1O" received FIN. +2024-08-24 21:10:22.023 +03:00 [DBG] Connection id "0HN64CV028H1O" is closed. The last processed stream ID was 1. +2024-08-24 21:10:22.027 +03:00 [DBG] Connection id "0HN64CV028H1O" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:10:22.034 +03:00 [DBG] Connection id "0HN64CV028H1O" stopped. +2024-08-24 21:18:47.619 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 21:18:47.939 +03:00 [DBG] Hosting starting +2024-08-24 21:18:48.203 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 21:18:48.213 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 21:18:48.260 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 21:18:48.292 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 21:18:48.322 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 21:18:48.365 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 21:18:48.382 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 21:18:48.387 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 21:18:48.393 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 21:18:48.418 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 21:18:48.427 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:18:48.438 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 21:18:48.443 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:18:48.458 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 21:18:48.472 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 21:18:48.487 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 21:18:48.493 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 21:18:49.447 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 21:18:49.545 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 21:18:49.552 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 21:18:49.556 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 21:18:49.561 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 21:18:49.565 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 21:18:49.568 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 21:18:49.570 +03:00 [INF] Hosting environment: Development +2024-08-24 21:18:49.581 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 21:18:49.585 +03:00 [DBG] Hosting started +2024-08-24 21:18:49.600 +03:00 [DBG] Connection id "0HN64D4PPE893" accepted. +2024-08-24 21:18:49.600 +03:00 [DBG] Connection id "0HN64D4PPE892" accepted. +2024-08-24 21:18:49.621 +03:00 [DBG] Connection id "0HN64D4PPE892" started. +2024-08-24 21:18:49.621 +03:00 [DBG] Connection id "0HN64D4PPE893" started. +2024-08-24 21:18:49.626 +03:00 [DBG] Connection id "0HN64D4PPE892" received FIN. +2024-08-24 21:18:49.626 +03:00 [DBG] Connection id "0HN64D4PPE893" received FIN. +2024-08-24 21:18:49.678 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:18:49.678 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:18:50.050 +03:00 [DBG] Connection id "0HN64D4PPE894" accepted. +2024-08-24 21:18:50.104 +03:00 [DBG] Connection id "0HN64D4PPE894" started. +2024-08-24 21:18:50.110 +03:00 [DBG] Connection id "0HN64D4PPE893" stopped. +2024-08-24 21:18:50.110 +03:00 [DBG] Connection id "0HN64D4PPE892" stopped. +2024-08-24 21:18:50.166 +03:00 [DBG] Connection id "0HN64D4PPE893" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:18:50.166 +03:00 [DBG] Connection id "0HN64D4PPE892" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:18:50.263 +03:00 [DBG] Connection 0HN64D4PPE894 established using the following protocol: "Tls13" +2024-08-24 21:18:50.465 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 21:18:50.913 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 21:18:50.984 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 21:18:50.991 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:18:51.524 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 21:18:51.576 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 21:18:51.598 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 1146.9270ms +2024-08-24 21:18:51.611 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 21:18:51.634 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 22.4280ms +2024-08-24 21:18:51.649 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 21:18:51.812 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 163.4564ms +2024-08-24 21:18:52.678 +03:00 [DBG] Connection id "0HN64D4PPE894" received FIN. +2024-08-24 21:18:52.692 +03:00 [DBG] Connection id "0HN64D4PPE894" is closed. The last processed stream ID was 5. +2024-08-24 21:18:52.700 +03:00 [DBG] Connection id "0HN64D4PPE894" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:18:52.714 +03:00 [DBG] Connection id "0HN64D4PPE894" stopped. +2024-08-24 21:18:54.072 +03:00 [DBG] Connection id "0HN64D4PPE895" accepted. +2024-08-24 21:18:54.077 +03:00 [DBG] Connection id "0HN64D4PPE895" started. +2024-08-24 21:18:54.098 +03:00 [DBG] Connection 0HN64D4PPE895 established using the following protocol: "Tls13" +2024-08-24 21:18:54.105 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 21:18:54.111 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 21:18:54.115 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:18:54.689 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 584.1181ms +2024-08-24 21:19:02.690 +03:00 [DBG] Connection id "0HN64D4PPE895" received FIN. +2024-08-24 21:19:02.698 +03:00 [DBG] Connection id "0HN64D4PPE895" is closed. The last processed stream ID was 1. +2024-08-24 21:19:02.707 +03:00 [DBG] Connection id "0HN64D4PPE895" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:19:02.713 +03:00 [DBG] Connection id "0HN64D4PPE895" stopped. +2024-08-24 21:22:19.718 +03:00 [DBG] Connection id "0HN64D4PPE896" accepted. +2024-08-24 21:22:19.739 +03:00 [DBG] Connection id "0HN64D4PPE896" started. +2024-08-24 21:22:19.773 +03:00 [DBG] Connection 0HN64D4PPE896 established using the following protocol: "Tls13" +2024-08-24 21:22:19.786 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 21:22:19.828 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 21:22:19.854 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 21:22:19.863 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:22:19.873 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:22:19.881 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:22:20.061 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 21:22:20.073 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:22:20.164 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 21:22:20.175 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:22:20.180 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:22:20.188 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 21:22:20.196 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:22:20.204 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:22:20.212 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:22:20.856 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 21:22:20.993 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:22:21.008 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:22:21.018 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 21:22:21.028 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:22:21.061 +03:00 [DBG] Connection id "0HN64D4PPE896", Request id "0HN64D4PPE896:00000001": started reading request body. +2024-08-24 21:22:21.068 +03:00 [DBG] Connection id "0HN64D4PPE896", Request id "0HN64D4PPE896:00000001": done reading request body. +2024-08-24 21:22:21.123 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 21:22:21.129 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:22:21.134 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:22:21.139 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:22:21.341 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:22:23.049 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 21:22:23.059 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 21:22:23.068 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 21:22:23.075 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 21:22:23.081 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 21:22:23.284 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:22:23.292 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:22:23.299 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:22:23.389 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:22:23.397 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:22:23.404 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:22:23.781 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:22:24.087 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 21:22:24.281 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 21:22:24.986 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:22:25.122 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:22:25.265 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (143ms). +2024-08-24 21:22:25.315 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:26.322 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:26.382 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:22:26.667 +03:00 [INF] Executed DbCommand (309ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:22:26.832 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:22:26.957 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:22:27.006 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:22:27.042 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:22:27.066 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.092 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.334 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 21:22:27.369 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:22:27.380 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:22:27.385 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:22:27.391 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.400 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.406 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:22:27.448 +03:00 [INF] Executed DbCommand (39ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:22:27.472 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:22:27.475 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.481 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.527 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 21:22:27.581 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:22:27.593 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:22:27.598 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:22:27.603 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.609 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.616 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:22:27.655 +03:00 [INF] Executed DbCommand (39ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:22:27.666 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:22:27.669 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.673 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.708 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:22:27.713 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:22:27.719 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.724 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.729 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:22:27.754 +03:00 [INF] Executed DbCommand (25ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:22:27.763 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:22:27.766 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:27.769 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:22:28.084 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:22:28.100 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:22:28.104 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:22:28.107 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:22:28.112 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:22:28.118 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:22:28.239 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 8008.8299ms +2024-08-24 21:22:28.249 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:22:28.290 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:22:28.309 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 8522.5383ms +2024-08-24 21:22:38.036 +03:00 [DBG] Connection id "0HN64D4PPE896" received FIN. +2024-08-24 21:22:38.042 +03:00 [DBG] Connection id "0HN64D4PPE896" is closed. The last processed stream ID was 1. +2024-08-24 21:22:38.047 +03:00 [DBG] Connection id "0HN64D4PPE896" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:22:38.052 +03:00 [DBG] Connection id "0HN64D4PPE896" stopped. +2024-08-24 21:23:27.326 +03:00 [DBG] Connection id "0HN64D4PPE897" accepted. +2024-08-24 21:23:27.347 +03:00 [DBG] Connection id "0HN64D4PPE897" started. +2024-08-24 21:23:27.392 +03:00 [DBG] Connection 0HN64D4PPE897 established using the following protocol: "Tls13" +2024-08-24 21:23:27.403 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/create application/json 162 +2024-08-24 21:23:27.453 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/create' +2024-08-24 21:23:27.465 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/create' is valid for the request path '/api/Booking/create' +2024-08-24 21:23:27.471 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:23:27.475 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:23:27.479 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:23:27.718 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:23:27.725 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:23:27.731 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:23:27.744 +03:00 [INF] Route matched with {action = "CreateBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] CreateBooking(HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:23:27.754 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:23:27.762 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:23:27.769 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:23:27.779 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:23:27.785 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:23:27.793 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:23:28.292 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:23:28.300 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 21:23:28.307 +03:00 [DBG] Attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' using the name '' in request data ... +2024-08-24 21:23:28.314 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:23:28.330 +03:00 [DBG] Connection id "0HN64D4PPE897", Request id "0HN64D4PPE897:00000001": started reading request body. +2024-08-24 21:23:28.336 +03:00 [DBG] Connection id "0HN64D4PPE897", Request id "0HN64D4PPE897:00000001": done reading request body. +2024-08-24 21:23:28.370 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' +2024-08-24 21:23:28.376 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:23:28.382 +03:00 [DBG] Done attempting to bind parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:23:28.387 +03:00 [DBG] Attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest' ... +2024-08-24 21:23:28.405 +03:00 [DBG] Done attempting to validate the bound parameter 'request' of type 'HotelBookingPlatform.Domain.DTOs.Booking.BookingCreateRequest'. +2024-08-24 21:23:28.523 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:23:28.534 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:28.539 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:23:28.544 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.547 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.551 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:23:28.592 +03:00 [INF] Executed DbCommand (41ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:23:28.604 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:28.610 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:28.616 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:28.622 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:28.625 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.630 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.662 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(r => r.RoomClass) + .FirstOrDefault(r => r.RoomID == __id_0)' +2024-08-24 21:23:28.716 +03:00 [DBG] Including navigation: 'Room.RoomClass'. +2024-08-24 21:23:28.739 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Room.RoomID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Room.AdultsCapacity (int) Required, 1], [Property: Room.ChildrenCapacity (int) Required, 2], [Property: Room.CreatedAtUtc (DateTime) Required, 3], [Property: Room.Number (string) Required MaxLength(50), 4], [Property: Room.PricePerNight (decimal) Required, 5], [Property: Room.RoomClassID (int) Required FK Index, 6] } + 1 -> Dictionary { [Property: RoomClass.RoomClassID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 7], [Property: RoomClass.CreatedAtUtc (DateTime) Required, 8], [Property: RoomClass.Description (string) MaxLength(500), 9], [Property: RoomClass.HotelId (int) Required FK Index, 10], [Property: RoomClass.Name (string) Required, 11], [Property: RoomClass.RoomType (RoomType) Required, 12] } + SELECT TOP(1) r.RoomID, r.AdultsCapacity, r.ChildrenCapacity, r.CreatedAtUtc, r.Number, r.PricePerNight, r.RoomClassID, r0.RoomClassID, r0.CreatedAtUtc, r0.Description, r0.HotelId, r0.Name, r0.RoomType + FROM Rooms AS r + INNER JOIN RoomClasses AS r0 ON r.RoomClassID == r0.RoomClassID + WHERE r.RoomID == @__id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:23:28.747 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:28.751 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:23:28.756 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.760 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:28.769 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:28.822 +03:00 [INF] Executed DbCommand (56ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:28.877 +03:00 [DBG] Context 'AppDbContext' started tracking 'Room' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:28.961 +03:00 [DBG] Context 'AppDbContext' started tracking 'RoomClass' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:29.014 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.017 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.024 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.041 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:29.044 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:23:29.049 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.054 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.059 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:29.101 +03:00 [INF] Executed DbCommand (42ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:29.110 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.114 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.120 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.134 +03:00 [DBG] Compiling query expression: +'DbSet() + .Where(d => d.RoomID == __roomId_0 && d.StartDateUtc <= __checkOutDate_1 && d.EndDateUtc >= __checkInDate_2 && DateTime.UtcNow >= d.StartDateUtc && DateTime.UtcNow <= d.EndDateUtc) + .FirstOrDefault()' +2024-08-24 21:23:29.171 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> Dictionary { [Property: Discount.DiscountID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Discount.CreatedAtUtc (DateTime) Required, 1], [Property: Discount.EndDateUtc (DateTime) Required, 2], [Property: Discount.IsActive (bool) Required, 3], [Property: Discount.Percentage (decimal) Required, 4], [Property: Discount.RoomClassID (no field, int?) Shadow FK Index, 5], [Property: Discount.RoomID (int) Required FK Index, 6], [Property: Discount.StartDateUtc (DateTime) Required, 7] } + SELECT TOP(1) d.DiscountID, d.CreatedAtUtc, d.EndDateUtc, d.IsActive, d.Percentage, d.RoomClassID, d.RoomID, d.StartDateUtc + FROM Discounts AS d + WHERE ((((d.RoomID == @__roomId_0) && (d.StartDateUtc <= @__checkOutDate_1)) && (d.EndDateUtc >= @__checkInDate_2)) && (GETUTCDATE() >= d.StartDateUtc)) && (GETUTCDATE() <= d.EndDateUtc)), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:23:29.190 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:29.195 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:23:29.204 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.211 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.216 +03:00 [DBG] Executing DbCommand [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkOutDate_1='?' (DbType = DateTime2), @__checkInDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkOutDate_1)) AND ([d].[EndDateUtc] >= @__checkInDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 21:23:29.257 +03:00 [INF] Executed DbCommand (40ms) [Parameters=[@__roomId_0='?' (DbType = Int32), @__checkOutDate_1='?' (DbType = DateTime2), @__checkInDate_2='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [d].[DiscountID], [d].[CreatedAtUtc], [d].[EndDateUtc], [d].[IsActive], [d].[Percentage], [d].[RoomClassID], [d].[RoomID], [d].[StartDateUtc] +FROM [Discounts] AS [d] +WHERE (((([d].[RoomID] = @__roomId_0) AND ([d].[StartDateUtc] <= @__checkOutDate_1)) AND ([d].[EndDateUtc] >= @__checkInDate_2)) AND (GETUTCDATE() >= [d].[StartDateUtc])) AND (GETUTCDATE() <= [d].[EndDateUtc]) +2024-08-24 21:23:29.279 +03:00 [DBG] Context 'AppDbContext' started tracking 'Discount' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:29.319 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.323 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.327 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.344 +03:00 [DBG] Compiling query expression: +'DbSet() + .Include(h => h.City) + .Include(h => h.Owner) + .Include(h => h.Reviews) + .AsSplitQuery() + .FirstOrDefault(h => h.HotelId == __id_0)' +2024-08-24 21:23:29.354 +03:00 [DBG] Including navigation: 'Hotel.City'. +2024-08-24 21:23:29.360 +03:00 [DBG] Including navigation: 'Hotel.Owner'. +2024-08-24 21:23:29.366 +03:00 [DBG] Including navigation: 'Hotel.Reviews'. +2024-08-24 21:23:29.472 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SplitQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: Hotel.HotelId (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: Hotel.CityID (int) Required FK Index, 1], [Property: Hotel.CreatedAtUtc (DateTime) Required, 2], [Property: Hotel.Description (string) MaxLength(500), 3], [Property: Hotel.Name (string) Required MaxLength(100), 4], [Property: Hotel.OwnerID (int) Required FK Index, 5], [Property: Hotel.PhoneNumber (string) Required MaxLength(15), 6], [Property: Hotel.StarRating (int) Required, 7] } + 1 -> Dictionary { [Property: City.CityID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 8], [Property: City.Country (string) Required, 9], [Property: City.CreatedAtUtc (DateTime) Required, 10], [Property: City.Description (string) Required, 11], [Property: City.Name (string) Required, 12], [Property: City.PostOffice (string) Required, 13], [Property: City.VisitCount (int) Required, 14] } + 2 -> Dictionary { [Property: Owner.OwnerID (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 15], [Property: Owner.Email (string) Required, 16], [Property: Owner.FirstName (string) Required, 17], [Property: Owner.LastName (string) Required, 18], [Property: Owner.PhoneNumber (string) Required, 19] } + 3 -> 0 + 4 -> 8 + 5 -> 15 + SELECT TOP(1) h.HotelId, h.CityID, h.CreatedAtUtc, h.Description, h.Name, h.OwnerID, h.PhoneNumber, h.StarRating, c.CityID, c.Country, c.CreatedAtUtc, c.Description, c.Name, c.PostOffice, c.VisitCount, o.OwnerID, o.Email, o.FirstName, o.LastName, o.PhoneNumber + FROM Hotels AS h + INNER JOIN Cities AS c ON h.CityID == c.CityID + INNER JOIN owners AS o ON h.OwnerID == o.OwnerID + WHERE h.HotelId == @__id_0 + ORDER BY h.HotelId ASC, c.CityID ASC, o.OwnerID ASC), + Func, + null, + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:23:29.494 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:29.499 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:23:29.505 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.510 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.512 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 21:23:29.561 +03:00 [INF] Executed DbCommand (49ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [h].[HotelId], [h].[CityID], [h].[CreatedAtUtc], [h].[Description], [h].[Name], [h].[OwnerID], [h].[PhoneNumber], [h].[StarRating], [c].[CityID], [c].[Country], [c].[CreatedAtUtc], [c].[Description], [c].[Name], [c].[PostOffice], [c].[VisitCount], [o].[OwnerID], [o].[Email], [o].[FirstName], [o].[LastName], [o].[PhoneNumber] +FROM [Hotels] AS [h] +INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] +INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] +WHERE [h].[HotelId] = @__id_0 +ORDER BY [h].[HotelId], [c].[CityID], [o].[OwnerID] +2024-08-24 21:23:29.675 +03:00 [DBG] Context 'AppDbContext' started tracking 'Hotel' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:29.725 +03:00 [DBG] Context 'AppDbContext' started tracking 'City' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:29.767 +03:00 [DBG] Context 'AppDbContext' started tracking 'Owner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:29.829 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:29.834 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:23:29.838 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 21:23:29.887 +03:00 [INF] Executed DbCommand (49ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT [r].[ReviewID], [r].[Content], [r].[CreatedAtUtc], [r].[HotelId], [r].[ModifiedAtUtc], [r].[Rating], [r].[UserId], [t].[HotelId], [t].[CityID], [t].[OwnerID] +FROM ( + SELECT TOP(1) [h].[HotelId], [c].[CityID], [o].[OwnerID] + FROM [Hotels] AS [h] + INNER JOIN [Cities] AS [c] ON [h].[CityID] = [c].[CityID] + INNER JOIN [owners] AS [o] ON [h].[OwnerID] = [o].[OwnerID] + WHERE [h].[HotelId] = @__id_0 +) AS [t] +INNER JOIN [Reviews] AS [r] ON [t].[HotelId] = [r].[HotelId] +ORDER BY [t].[HotelId], [t].[CityID], [t].[OwnerID] +2024-08-24 21:23:29.914 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.917 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.921 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.927 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.933 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:29.938 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:23:29.943 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.949 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.954 +03:00 [DBG] Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:29.983 +03:00 [INF] Executed DbCommand (29ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT TOP(1) [r].[RoomID], [r].[AdultsCapacity], [r].[ChildrenCapacity], [r].[CreatedAtUtc], [r].[Number], [r].[PricePerNight], [r].[RoomClassID], [r0].[RoomClassID], [r0].[CreatedAtUtc], [r0].[Description], [r0].[HotelId], [r0].[Name], [r0].[RoomType] +FROM [Rooms] AS [r] +INNER JOIN [RoomClasses] AS [r0] ON [r].[RoomClassID] = [r0].[RoomClassID] +WHERE [r].[RoomID] = @__id_0 +2024-08-24 21:23:29.990 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:29.994 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:29.999 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:30.214 +03:00 [DBG] 'AppDbContext' generated a temporary value for the property 'BookingID.Booking'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:30.320 +03:00 [DBG] Context 'AppDbContext' started tracking 'Booking' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:30.353 +03:00 [DBG] Context 'AppDbContext' started tracking 'BookingRoom' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:30.375 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 21:23:30.387 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 21:23:30.515 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 21:23:30.568 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:30.574 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:30.585 +03:00 [DBG] Beginning transaction with isolation level 'Unspecified'. +2024-08-24 21:23:30.621 +03:00 [DBG] Began transaction with isolation level 'ReadCommitted'. +2024-08-24 21:23:30.756 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:30.763 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (7ms). +2024-08-24 21:23:30.782 +03:00 [DBG] Executing DbCommand [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 21:23:30.819 +03:00 [INF] Executed DbCommand (37ms) [Parameters=[@p0='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (Precision = 18) (Scale = 2) (DbType = Decimal), @p8='?' (Size = 450), @p9='?' (Size = 4000)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [Bookings] ([AfterDiscountedPrice], [BookingDateUtc], [CheckInDateUtc], [CheckOutDateUtc], [HotelId], [PaymentMethod], [Status], [TotalPrice], [UserId], [confirmationNumber]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9); +SELECT [BookingID] +FROM [Bookings] +WHERE @@ROWCOUNT = 1 AND [BookingID] = scope_identity(); +2024-08-24 21:23:30.896 +03:00 [DBG] The foreign key property 'Booking.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 21:23:30.923 +03:00 [DBG] The foreign key property 'BookingRoom.BookingID' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2024-08-24 21:23:30.938 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:30.944 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:23:30.948 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:23:30.955 +03:00 [DBG] Executing DbCommand [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 21:23:30.972 +03:00 [INF] Executed DbCommand (17ms) [Parameters=[@p10='?' (DbType = Int32), @p11='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SET NOCOUNT ON; +INSERT INTO [BookingRoom] ([BookingID], [RoomID]) +VALUES (@p10, @p11); +2024-08-24 21:23:30.983 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:23:31.004 +03:00 [DBG] Committing transaction. +2024-08-24 21:23:31.024 +03:00 [DBG] Committed transaction. +2024-08-24 21:23:31.043 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:31.048 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:23:31.065 +03:00 [DBG] Disposing transaction. +2024-08-24 21:23:31.122 +03:00 [DBG] An entity of type 'Booking' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:31.132 +03:00 [DBG] An entity of type 'BookingRoom' tracked by 'AppDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:23:31.150 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 2 entities written to the database. +2024-08-24 21:23:31.158 +03:00 [DBG] SaveChanges starting for 'AppDbContext'. +2024-08-24 21:23:31.163 +03:00 [DBG] DetectChanges starting for 'AppDbContext'. +2024-08-24 21:23:31.167 +03:00 [DBG] DetectChanges completed for 'AppDbContext'. +2024-08-24 21:23:31.172 +03:00 [DBG] SaveChanges completed for 'AppDbContext' with 0 entities written to the database. +2024-08-24 21:23:31.213 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:23:31.226 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:23:31.229 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:23:31.233 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:23:31.238 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:23:31.244 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.DTOs.Booking.BookingDto, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:23:31.297 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API) in 3504.1119ms +2024-08-24 21:23:31.303 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.CreateBooking (HotelBookingPlatform.API)' +2024-08-24 21:23:31.308 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:23:31.312 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/create application/json 162 - 200 - application/json;+charset=utf-8 3910.9333ms +2024-08-24 21:23:38.110 +03:00 [DBG] Connection id "0HN64D4PPE897" received FIN. +2024-08-24 21:23:38.118 +03:00 [DBG] Connection id "0HN64D4PPE897" is closed. The last processed stream ID was 1. +2024-08-24 21:23:38.126 +03:00 [DBG] Connection id "0HN64D4PPE897" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:23:38.136 +03:00 [DBG] Connection id "0HN64D4PPE897" stopped. +2024-08-24 21:27:13.852 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 21:27:14.115 +03:00 [DBG] Hosting starting +2024-08-24 21:27:14.197 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 21:27:14.207 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 21:27:14.219 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 21:27:14.224 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 21:27:14.228 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 21:27:14.248 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 21:27:14.261 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 21:27:14.265 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 21:27:14.268 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 21:27:14.287 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 21:27:14.300 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:27:14.313 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 21:27:14.319 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:27:14.337 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 21:27:14.353 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 21:27:14.370 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 21:27:14.376 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 21:27:14.787 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 21:27:14.926 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 21:27:14.929 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 21:27:14.932 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 21:27:14.935 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 21:27:14.937 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 21:27:14.940 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 21:27:14.943 +03:00 [INF] Hosting environment: Development +2024-08-24 21:27:14.947 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 21:27:14.950 +03:00 [DBG] Hosting started +2024-08-24 21:27:14.982 +03:00 [DBG] Connection id "0HN64D9GD6VQE" received FIN. +2024-08-24 21:27:15.003 +03:00 [DBG] Connection id "0HN64D9GD6VQE" accepted. +2024-08-24 21:27:15.009 +03:00 [DBG] Connection id "0HN64D9GD6VQE" started. +2024-08-24 21:27:15.057 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:27:15.162 +03:00 [DBG] Connection id "0HN64D9GD6VQE" stopped. +2024-08-24 21:27:15.171 +03:00 [DBG] Connection id "0HN64D9GD6VQE" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:27:15.402 +03:00 [DBG] Connection id "0HN64D9GD6VQF" accepted. +2024-08-24 21:27:15.407 +03:00 [DBG] Connection id "0HN64D9GD6VQF" started. +2024-08-24 21:27:15.550 +03:00 [DBG] Connection 0HN64D9GD6VQF established using the following protocol: "Tls13" +2024-08-24 21:27:15.709 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 21:27:16.109 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 21:27:16.216 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 21:27:16.220 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:27:16.826 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 21:27:16.895 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 21:27:16.920 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 1221.8222ms +2024-08-24 21:27:16.923 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 21:27:16.936 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 12.1916ms +2024-08-24 21:27:16.962 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 21:27:17.149 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 188.0740ms +2024-08-24 21:27:19.368 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 21:27:19.373 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 21:27:19.377 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:27:20.079 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 711.4986ms +2024-08-24 21:27:23.364 +03:00 [DBG] Connection id "0HN64D9GD6VQF" received FIN. +2024-08-24 21:27:23.402 +03:00 [DBG] Connection id "0HN64D9GD6VQF" is closed. The last processed stream ID was 7. +2024-08-24 21:27:23.416 +03:00 [DBG] Connection id "0HN64D9GD6VQF" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:27:23.428 +03:00 [DBG] Connection id "0HN64D9GD6VQF" stopped. +2024-08-24 21:27:42.894 +03:00 [DBG] Connection id "0HN64D9GD6VQG" accepted. +2024-08-24 21:27:42.904 +03:00 [DBG] Connection id "0HN64D9GD6VQG" started. +2024-08-24 21:27:42.912 +03:00 [DBG] Connection 0HN64D9GD6VQG established using the following protocol: "Tls13" +2024-08-24 21:27:42.921 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 21:27:42.944 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 21:27:42.970 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 21:27:42.977 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:27:42.985 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:27:42.990 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:27:43.144 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 21:27:43.156 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:27:43.287 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 21:27:43.296 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:27:43.302 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:27:43.308 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 21:27:43.314 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:27:43.321 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:27:43.327 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:27:43.774 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 21:27:43.945 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:27:43.965 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:27:43.976 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 21:27:43.984 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:27:44.034 +03:00 [DBG] Connection id "0HN64D9GD6VQG", Request id "0HN64D9GD6VQG:00000001": started reading request body. +2024-08-24 21:27:44.041 +03:00 [DBG] Connection id "0HN64D9GD6VQG", Request id "0HN64D9GD6VQG:00000001": done reading request body. +2024-08-24 21:27:44.123 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 21:27:44.128 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:27:44.132 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:27:44.136 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:27:44.206 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:27:46.576 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 21:27:46.585 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 21:27:46.589 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 21:27:46.594 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 21:27:46.600 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 21:27:46.865 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:27:46.870 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:27:46.874 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:27:46.994 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:27:47.000 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:27:47.006 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:27:47.563 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:27:47.874 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 21:27:48.146 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 21:27:49.112 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:27:49.300 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:27:49.403 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (103ms). +2024-08-24 21:27:49.460 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:50.351 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:50.403 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:27:50.714 +03:00 [INF] Executed DbCommand (322ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:27:50.977 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:27:51.198 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:27:51.288 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:27:51.348 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:27:51.377 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.408 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.515 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 21:27:51.545 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:27:51.553 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:27:51.556 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:27:51.561 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.572 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.578 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:27:51.620 +03:00 [INF] Executed DbCommand (42ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:27:51.635 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:27:51.638 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.643 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.697 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 21:27:51.752 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:27:51.759 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:27:51.763 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2024-08-24 21:27:51.767 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.771 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.775 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:27:51.812 +03:00 [INF] Executed DbCommand (37ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:27:51.820 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:27:51.822 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.826 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.865 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:27:51.869 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:27:51.874 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.880 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.885 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:27:51.908 +03:00 [INF] Executed DbCommand (24ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:27:51.916 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:27:51.919 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:51.924 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:27:52.289 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:27:52.304 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:27:52.306 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:27:52.309 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:27:52.315 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:27:52.320 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:27:52.467 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 9123.2472ms +2024-08-24 21:27:52.478 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:27:52.514 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:27:52.530 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 9609.6688ms +2024-08-24 21:27:53.399 +03:00 [DBG] Connection id "0HN64D9GD6VQG" received FIN. +2024-08-24 21:27:53.407 +03:00 [DBG] Connection id "0HN64D9GD6VQG" is closed. The last processed stream ID was 1. +2024-08-24 21:27:53.417 +03:00 [DBG] Connection id "0HN64D9GD6VQG" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:27:53.433 +03:00 [DBG] Connection id "0HN64D9GD6VQG" stopped. +2024-08-24 21:28:19.454 +03:00 [DBG] Connection id "0HN64D9GD6VQH" accepted. +2024-08-24 21:28:19.466 +03:00 [DBG] Connection id "0HN64D9GD6VQH" started. +2024-08-24 21:28:19.490 +03:00 [DBG] Connection 0HN64D9GD6VQH established using the following protocol: "Tls13" +2024-08-24 21:28:19.498 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 362 +2024-08-24 21:28:19.521 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/confirm' +2024-08-24 21:28:19.526 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/confirm' is valid for the request path '/api/Booking/confirm' +2024-08-24 21:28:19.532 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:19.536 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:28:19.540 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:28:19.850 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:28:19.858 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:28:19.864 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:19.883 +03:00 [INF] Route matched with {action = "ConfirmBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ConfirmBooking(HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:28:19.891 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:28:19.895 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:28:19.900 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:28:19.909 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:28:19.914 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:28:19.918 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:28:20.611 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:28:20.618 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:28:20.623 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' using the name '' in request data ... +2024-08-24 21:28:20.628 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:28:20.662 +03:00 [DBG] Connection id "0HN64D9GD6VQH", Request id "0HN64D9GD6VQH:00000001": started reading request body. +2024-08-24 21:28:20.668 +03:00 [DBG] Connection id "0HN64D9GD6VQH", Request id "0HN64D9GD6VQH:00000001": done reading request body. +2024-08-24 21:28:20.746 +03:00 [DBG] JSON input formatter threw an exception: '"' is invalid after a value. Expected either ',', '}', or ']'. Path: $ | LineNumber: 10 | BytePositionInLine: 2. +2024-08-24 21:28:20.750 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:20.756 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:20.760 +03:00 [DBG] Attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:28:20.784 +03:00 [DBG] Done attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:20.790 +03:00 [DBG] The request has model state errors, returning an error response. +2024-08-24 21:28:20.797 +03:00 [DBG] Request was short circuited at action filter 'Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter'. +2024-08-24 21:28:20.801 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:28:20.809 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:28:20.812 +03:00 [DBG] Attempting to select the first output formatter in the output formatters list which supports a content type from the explicitly specified content types '["application/problem+json","application/problem+xml","application/problem+json","application/problem+xml"]'. +2024-08-24 21:28:20.821 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/problem+json' to write the response. +2024-08-24 21:28:20.826 +03:00 [INF] Executing BadRequestObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.ValidationProblemDetails'. +2024-08-24 21:28:20.869 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API) in 951.2964ms +2024-08-24 21:28:20.876 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:20.880 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 362 - 400 - application/problem+json;+charset=utf-8 1382.7718ms +2024-08-24 21:28:23.429 +03:00 [DBG] Connection id "0HN64D9GD6VQH" received FIN. +2024-08-24 21:28:23.436 +03:00 [DBG] Connection id "0HN64D9GD6VQH" is closed. The last processed stream ID was 1. +2024-08-24 21:28:23.443 +03:00 [DBG] Connection id "0HN64D9GD6VQH" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:28:23.460 +03:00 [DBG] Connection id "0HN64D9GD6VQH" stopped. +2024-08-24 21:28:52.133 +03:00 [DBG] Connection id "0HN64D9GD6VQI" accepted. +2024-08-24 21:28:52.144 +03:00 [DBG] Connection id "0HN64D9GD6VQI" started. +2024-08-24 21:28:52.156 +03:00 [DBG] Connection 0HN64D9GD6VQI established using the following protocol: "Tls13" +2024-08-24 21:28:52.174 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 362 +2024-08-24 21:28:52.192 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/confirm' +2024-08-24 21:28:52.197 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/confirm' is valid for the request path '/api/Booking/confirm' +2024-08-24 21:28:52.202 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:52.207 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:28:52.215 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:28:52.224 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:28:52.228 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:28:52.231 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:52.235 +03:00 [INF] Route matched with {action = "ConfirmBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ConfirmBooking(HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:28:52.243 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:28:52.248 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:28:52.254 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:28:52.265 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:28:52.274 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:28:52.280 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:28:52.297 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:28:52.301 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:28:52.304 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' using the name '' in request data ... +2024-08-24 21:28:52.311 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:28:52.314 +03:00 [DBG] Connection id "0HN64D9GD6VQI", Request id "0HN64D9GD6VQI:00000001": started reading request body. +2024-08-24 21:28:52.318 +03:00 [DBG] Connection id "0HN64D9GD6VQI", Request id "0HN64D9GD6VQI:00000001": done reading request body. +2024-08-24 21:28:52.328 +03:00 [DBG] JSON input formatter threw an exception: '"' is invalid after a value. Expected either ',', '}', or ']'. Path: $ | LineNumber: 10 | BytePositionInLine: 2. +2024-08-24 21:28:52.330 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:52.334 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:52.339 +03:00 [DBG] Attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:28:52.345 +03:00 [DBG] Done attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:28:52.349 +03:00 [DBG] The request has model state errors, returning an error response. +2024-08-24 21:28:52.351 +03:00 [DBG] Request was short circuited at action filter 'Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter'. +2024-08-24 21:28:52.355 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:28:52.364 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:28:52.366 +03:00 [DBG] Attempting to select the first output formatter in the output formatters list which supports a content type from the explicitly specified content types '["application/problem+json","application/problem+xml","application/problem+json","application/problem+xml"]'. +2024-08-24 21:28:52.376 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/problem+json' to write the response. +2024-08-24 21:28:52.381 +03:00 [INF] Executing BadRequestObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.ValidationProblemDetails'. +2024-08-24 21:28:52.385 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API) in 104.7562ms +2024-08-24 21:28:52.393 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:28:52.397 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 362 - 400 - application/problem+json;+charset=utf-8 223.1312ms +2024-08-24 21:28:53.466 +03:00 [DBG] Connection id "0HN64D9GD6VQI" received FIN. +2024-08-24 21:28:53.472 +03:00 [DBG] Connection id "0HN64D9GD6VQI" is closed. The last processed stream ID was 1. +2024-08-24 21:28:53.473 +03:00 [DBG] Connection id "0HN64D9GD6VQI" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:28:53.493 +03:00 [DBG] Connection id "0HN64D9GD6VQI" stopped. +2024-08-24 21:29:32.554 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" accepted. +2024-08-24 21:29:32.587 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" started. +2024-08-24 21:29:32.631 +03:00 [DBG] Connection 0HN64D9GD6VQJ established using the following protocol: "Tls13" +2024-08-24 21:29:32.637 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 363 +2024-08-24 21:29:32.649 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/confirm' +2024-08-24 21:29:32.655 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/confirm' is valid for the request path '/api/Booking/confirm' +2024-08-24 21:29:32.660 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:29:32.664 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:29:32.666 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:29:32.669 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:29:32.671 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:29:32.675 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:29:32.679 +03:00 [INF] Route matched with {action = "ConfirmBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ConfirmBooking(HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:29:32.684 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:29:32.690 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:29:32.695 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:29:32.702 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:29:32.707 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:29:32.712 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:29:32.736 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:29:32.741 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:29:32.746 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' using the name '' in request data ... +2024-08-24 21:29:32.750 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:29:32.755 +03:00 [DBG] Connection id "0HN64D9GD6VQJ", Request id "0HN64D9GD6VQJ:00000001": started reading request body. +2024-08-24 21:29:32.760 +03:00 [DBG] Connection id "0HN64D9GD6VQJ", Request id "0HN64D9GD6VQJ:00000001": done reading request body. +2024-08-24 21:29:32.766 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' +2024-08-24 21:29:32.772 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:29:32.776 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:29:32.781 +03:00 [DBG] Attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:29:32.792 +03:00 [DBG] Done attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:29:36.884 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:29:36.891 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:29:36.893 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:29:36.896 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:29:36.898 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:29:36.902 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2024-08-24 21:29:36.910 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API) in 4197.8754ms +2024-08-24 21:29:36.915 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:29:36.918 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 363 - 200 - application/json;+charset=utf-8 4281.0051ms +2024-08-24 21:29:43.502 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" received FIN. +2024-08-24 21:29:43.510 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" is closed. The last processed stream ID was 1. +2024-08-24 21:29:43.518 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:29:43.535 +03:00 [DBG] Connection id "0HN64D9GD6VQJ" stopped. +2024-08-24 21:31:45.207 +03:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2024-08-24 21:31:45.436 +03:00 [DBG] Hosting starting +2024-08-24 21:31:45.508 +03:00 [INF] User profile is available. Using 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2024-08-24 21:31:45.517 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-5dc8f8a8-2ffa-4a04-9c24-99574df10981.xml'. +2024-08-24 21:31:45.534 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-7f2c3628-443f-404a-ae0c-68b85bc9411a.xml'. +2024-08-24 21:31:45.540 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-8b924b12-ddc6-487f-b83a-45744266a460.xml'. +2024-08-24 21:31:45.544 +03:00 [DBG] Reading data from file 'C:\Users\hp\AppData\Local\ASP.NET\DataProtection-Keys\key-e554efbd-c8ad-408b-86ee-59e78d255d63.xml'. +2024-08-24 21:31:45.559 +03:00 [DBG] Found key {5dc8f8a8-2ffa-4a04-9c24-99574df10981}. +2024-08-24 21:31:45.573 +03:00 [DBG] Found key {7f2c3628-443f-404a-ae0c-68b85bc9411a}. +2024-08-24 21:31:45.577 +03:00 [DBG] Found key {8b924b12-ddc6-487f-b83a-45744266a460}. +2024-08-24 21:31:45.580 +03:00 [DBG] Found key {e554efbd-c8ad-408b-86ee-59e78d255d63}. +2024-08-24 21:31:45.608 +03:00 [DBG] Considering key {7f2c3628-443f-404a-ae0c-68b85bc9411a} with expiration date 2024-08-24 22:00:11Z as default key. +2024-08-24 21:31:45.621 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:31:45.635 +03:00 [DBG] Decrypting secret element using Windows DPAPI. +2024-08-24 21:31:45.641 +03:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 +2024-08-24 21:31:45.662 +03:00 [DBG] Opening CNG algorithm 'AES' from provider 'null' with chaining mode CBC. +2024-08-24 21:31:45.677 +03:00 [DBG] Opening CNG algorithm 'SHA256' from provider 'null' with HMAC. +2024-08-24 21:31:45.691 +03:00 [DBG] Using key {7f2c3628-443f-404a-ae0c-68b85bc9411a} as the default key. +2024-08-24 21:31:45.696 +03:00 [DBG] Key ring with default key {7f2c3628-443f-404a-ae0c-68b85bc9411a} was loaded during application startup. +2024-08-24 21:31:46.015 +03:00 [DBG] Using development certificate: CN=localhost (Thumbprint: 11B01FF3F2247D8CCE18AD0B376E737147DB39EC) +2024-08-24 21:31:46.135 +03:00 [DBG] Connection id "0HN64DC174CM9" received FIN. +2024-08-24 21:31:46.139 +03:00 [DBG] Connection id "0HN64DC174CMA" received FIN. +2024-08-24 21:31:46.144 +03:00 [DBG] Connection id "0HN64DC174CMA" accepted. +2024-08-24 21:31:46.144 +03:00 [DBG] Connection id "0HN64DC174CM9" accepted. +2024-08-24 21:31:46.150 +03:00 [DBG] Connection id "0HN64DC174CMA" started. +2024-08-24 21:31:46.151 +03:00 [DBG] Connection id "0HN64DC174CM9" started. +2024-08-24 21:31:46.153 +03:00 [INF] Now listening on: https://localhost:7054 +2024-08-24 21:31:46.163 +03:00 [INF] Now listening on: http://localhost:5248 +2024-08-24 21:31:46.166 +03:00 [DBG] Loaded hosting startup assembly HotelBookingPlatform.API +2024-08-24 21:31:46.168 +03:00 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2024-08-24 21:31:46.172 +03:00 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2024-08-24 21:31:46.179 +03:00 [INF] Application started. Press Ctrl+C to shut down. +2024-08-24 21:31:46.182 +03:00 [INF] Hosting environment: Development +2024-08-24 21:31:46.187 +03:00 [INF] Content root path: C:\Users\hp\Desktop\C#\HotelBookingPlatform.API\ +2024-08-24 21:31:46.190 +03:00 [DBG] Hosting started +2024-08-24 21:31:46.204 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:31:46.204 +03:00 [DBG] Failed to authenticate HTTPS connection. +System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. + at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) + at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) + at System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken) + at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context) +2024-08-24 21:31:46.315 +03:00 [DBG] Connection id "0HN64DC174CM9" stopped. +2024-08-24 21:31:46.315 +03:00 [DBG] Connection id "0HN64DC174CMA" stopped. +2024-08-24 21:31:46.323 +03:00 [DBG] Connection id "0HN64DC174CMA" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:31:46.323 +03:00 [DBG] Connection id "0HN64DC174CM9" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:31:46.578 +03:00 [DBG] Connection id "0HN64DC174CMB" accepted. +2024-08-24 21:31:46.621 +03:00 [DBG] Connection id "0HN64DC174CMB" started. +2024-08-24 21:31:46.726 +03:00 [DBG] Connection 0HN64DC174CMB established using the following protocol: "Tls13" +2024-08-24 21:31:46.913 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/index.html - - +2024-08-24 21:31:47.253 +03:00 [DBG] Wildcard detected, all requests with hosts will be allowed. +2024-08-24 21:31:47.348 +03:00 [DBG] No candidates found for the request path '/swagger/index.html' +2024-08-24 21:31:47.353 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:31:47.822 +03:00 [DBG] Response markup is scheduled to include browser refresh script injection. +2024-08-24 21:31:47.890 +03:00 [DBG] Response markup was updated to include browser refresh script injection. +2024-08-24 21:31:47.923 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/index.html - - - 200 - text/html;charset=utf-8 1022.0472ms +2024-08-24 21:31:47.924 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - +2024-08-24 21:31:47.940 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_framework/aspnetcore-browser-refresh.js - - - 200 12380 application/javascript;+charset=utf-8 16.5597ms +2024-08-24 21:31:47.964 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/_vs/browserLink - - +2024-08-24 21:31:48.126 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 162.5223ms +2024-08-24 21:31:50.341 +03:00 [INF] Request starting HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - +2024-08-24 21:31:50.346 +03:00 [DBG] No candidates found for the request path '/swagger/v1/swagger.json' +2024-08-24 21:31:50.351 +03:00 [DBG] Request did not match any endpoints +2024-08-24 21:31:51.002 +03:00 [INF] Request finished HTTP/2 GET https://localhost:7054/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 661.1992ms +2024-08-24 21:31:53.655 +03:00 [DBG] Connection id "0HN64DC174CMB" received FIN. +2024-08-24 21:31:53.678 +03:00 [DBG] Connection id "0HN64DC174CMB" is closed. The last processed stream ID was 7. +2024-08-24 21:31:53.689 +03:00 [DBG] Connection id "0HN64DC174CMB" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:31:53.706 +03:00 [DBG] Connection id "0HN64DC174CMB" stopped. +2024-08-24 21:32:19.705 +03:00 [DBG] Connection id "0HN64DC174CMC" accepted. +2024-08-24 21:32:19.719 +03:00 [DBG] Connection id "0HN64DC174CMC" started. +2024-08-24 21:32:19.798 +03:00 [DBG] Connection 0HN64DC174CMC established using the following protocol: "Tls13" +2024-08-24 21:32:19.809 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 +2024-08-24 21:32:19.831 +03:00 [DBG] 1 candidate(s) found for the request path '/api/auth/login' +2024-08-24 21:32:19.853 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' with route pattern 'api/auth/login' is valid for the request path '/api/auth/login' +2024-08-24 21:32:19.861 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:32:19.870 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:32:19.876 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:32:20.043 +03:00 [DBG] AuthenticationScheme: Bearer was not authenticated. +2024-08-24 21:32:20.051 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:32:20.130 +03:00 [INF] Route matched with {action = "Login", controller = "User"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] LoginAsync(HotelBookingPlatform.Domain.Helpers.LoginModel) on controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API). +2024-08-24 21:32:20.140 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:32:20.147 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:32:20.154 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2024-08-24 21:32:20.161 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:32:20.167 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:32:20.174 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:32:20.591 +03:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2024-08-24 21:32:20.820 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.UserController (HotelBookingPlatform.API) +2024-08-24 21:32:20.838 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:32:20.851 +03:00 [DBG] Attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' using the name '' in request data ... +2024-08-24 21:32:20.860 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:32:20.907 +03:00 [DBG] Connection id "0HN64DC174CMC", Request id "0HN64DC174CMC:00000001": started reading request body. +2024-08-24 21:32:20.914 +03:00 [DBG] Connection id "0HN64DC174CMC", Request id "0HN64DC174CMC:00000001": done reading request body. +2024-08-24 21:32:20.985 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.Helpers.LoginModel' +2024-08-24 21:32:20.990 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:32:20.996 +03:00 [DBG] Done attempting to bind parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:32:21.000 +03:00 [DBG] Attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel' ... +2024-08-24 21:32:21.070 +03:00 [DBG] Done attempting to validate the bound parameter 'model' of type 'HotelBookingPlatform.Domain.Helpers.LoginModel'. +2024-08-24 21:32:23.092 +03:00 [DBG] The index {'BookingID'} was not created on entity type 'BookingRoom (Dictionary)' as the properties are already covered by the index {'BookingID', 'RoomID'}. +2024-08-24 21:32:23.100 +03:00 [DBG] The index {'LocalUserId'} was not created on entity type 'RefreshToken' as the properties are already covered by the index {'LocalUserId', 'Id'}. +2024-08-24 21:32:23.106 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserRole' as the properties are already covered by the index {'UserId', 'RoleId'}. +2024-08-24 21:32:23.115 +03:00 [DBG] The index {'UserId'} was not created on entity type 'IdentityUserToken' as the properties are already covered by the index {'UserId', 'LoginProvider', 'Name'}. +2024-08-24 21:32:23.121 +03:00 [DBG] The index {'AmenityID'} was not created on entity type 'RoomClassAmenity (Dictionary)' as the properties are already covered by the index {'AmenityID', 'RoomClassID'}. +2024-08-24 21:32:23.381 +03:00 [DBG] The property 'Discount.RoomClassID' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:32:23.389 +03:00 [DBG] The property 'RefreshToken.LocalUserId' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:32:23.394 +03:00 [DBG] The property 'RefreshToken.Id' was created in shadow state because there are no eligible CLR members with a matching name. +2024-08-24 21:32:23.495 +03:00 [WRN] No store type was specified for the decimal property 'AfterDiscountedPrice' on entity type 'Booking'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:32:23.502 +03:00 [WRN] No store type was specified for the decimal property 'DiscountPercentageAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:32:23.507 +03:00 [WRN] No store type was specified for the decimal property 'PriceAtBooking' on entity type 'InvoiceRecord'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. +2024-08-24 21:32:23.938 +03:00 [INF] Entity Framework Core 6.0.32 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.32' with options: None +2024-08-24 21:32:24.271 +03:00 [DBG] Compiling query expression: +'DbSet() + .SingleOrDefault(u => u.NormalizedEmail == __normalizedEmail_0)' +2024-08-24 21:32:24.605 +03:00 [DBG] Including navigation: 'LocalUser.RefreshTokens'. +2024-08-24 21:32:25.498 +03:00 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: LocalUser.Id (string) Required PK AfterSave:Throw, 0], [Property: LocalUser.AccessFailedCount (int) Required, 1], [Property: LocalUser.ConcurrencyStamp (string) Concurrency, 2], [Property: LocalUser.Email (string) MaxLength(256), 3], [Property: LocalUser.EmailConfirmed (bool) Required, 4], [Property: LocalUser.FirstName (string) Required, 5], [Property: LocalUser.LastName (string) Required, 6], [Property: LocalUser.LockoutEnabled (bool) Required, 7], [Property: LocalUser.LockoutEnd (DateTimeOffset?), 8], [Property: LocalUser.NormalizedEmail (string) Index MaxLength(256), 9], [Property: LocalUser.NormalizedUserName (string) Index MaxLength(256), 10], [Property: LocalUser.PasswordHash (string), 11], [Property: LocalUser.PhoneNumber (string), 12], [Property: LocalUser.PhoneNumberConfirmed (bool) Required, 13], [Property: LocalUser.SecurityStamp (string), 14], [Property: LocalUser.TwoFactorEnabled (bool) Required, 15], [Property: LocalUser.UserName (string) MaxLength(256), 16] } + 1 -> 0 + 2 -> Dictionary { [Property: RefreshToken.LocalUserId (no field, string) Shadow Required PK FK AfterSave:Throw, 17], [Property: RefreshToken.Id (no field, int) Shadow Required PK AfterSave:Throw ValueGenerated.OnAdd, 18], [Property: RefreshToken.CreatedOn (DateTime) Required, 19], [Property: RefreshToken.ExpiresOn (DateTime) Required, 20], [Property: RefreshToken.RevokedOn (DateTime?), 21], [Property: RefreshToken.Token (string) Required, 22] } + 3 -> 17 + 4 -> 18 + SELECT t.Id, t.AccessFailedCount, t.ConcurrencyStamp, t.Email, t.EmailConfirmed, t.FirstName, t.LastName, t.LockoutEnabled, t.LockoutEnd, t.NormalizedEmail, t.NormalizedUserName, t.PasswordHash, t.PhoneNumber, t.PhoneNumberConfirmed, t.SecurityStamp, t.TwoFactorEnabled, t.UserName, r.LocalUserId, r.Id, r.CreatedOn, r.ExpiresOn, r.RevokedOn, r.Token + FROM + ( + SELECT TOP(2) a.Id, a.AccessFailedCount, a.ConcurrencyStamp, a.Email, a.EmailConfirmed, a.FirstName, a.LastName, a.LockoutEnabled, a.LockoutEnd, a.NormalizedEmail, a.NormalizedUserName, a.PasswordHash, a.PhoneNumber, a.PhoneNumberConfirmed, a.SecurityStamp, a.TwoFactorEnabled, a.UserName + FROM AspNetUsers AS a + WHERE a.NormalizedEmail == @__normalizedEmail_0 + ) AS t + LEFT JOIN RefreshToken AS r ON t.Id == r.LocalUserId + ORDER BY t.Id ASC, r.LocalUserId ASC), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True + ), + cancellationToken: queryContext.CancellationToken)' +2024-08-24 21:32:25.658 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:32:25.754 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (97ms). +2024-08-24 21:32:25.800 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:26.550 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:26.594 +03:00 [DBG] Executing DbCommand [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:32:26.834 +03:00 [INF] Executed DbCommand (253ms) [Parameters=[@__normalizedEmail_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +SELECT [t].[Id], [t].[AccessFailedCount], [t].[ConcurrencyStamp], [t].[Email], [t].[EmailConfirmed], [t].[FirstName], [t].[LastName], [t].[LockoutEnabled], [t].[LockoutEnd], [t].[NormalizedEmail], [t].[NormalizedUserName], [t].[PasswordHash], [t].[PhoneNumber], [t].[PhoneNumberConfirmed], [t].[SecurityStamp], [t].[TwoFactorEnabled], [t].[UserName], [r].[LocalUserId], [r].[Id], [r].[CreatedOn], [r].[ExpiresOn], [r].[RevokedOn], [r].[Token] +FROM ( + SELECT TOP(2) [a].[Id], [a].[AccessFailedCount], [a].[ConcurrencyStamp], [a].[Email], [a].[EmailConfirmed], [a].[FirstName], [a].[LastName], [a].[LockoutEnabled], [a].[LockoutEnd], [a].[NormalizedEmail], [a].[NormalizedUserName], [a].[PasswordHash], [a].[PhoneNumber], [a].[PhoneNumberConfirmed], [a].[SecurityStamp], [a].[TwoFactorEnabled], [a].[UserName] + FROM [AspNetUsers] AS [a] + WHERE [a].[NormalizedEmail] = @__normalizedEmail_0 +) AS [t] +LEFT JOIN [RefreshToken] AS [r] ON [t].[Id] = [r].[LocalUserId] +ORDER BY [t].[Id], [r].[LocalUserId] +2024-08-24 21:32:27.000 +03:00 [DBG] Context 'AppDbContext' started tracking 'LocalUser' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:32:27.138 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:32:27.197 +03:00 [DBG] Context 'AppDbContext' started tracking 'RefreshToken' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2024-08-24 21:32:27.234 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:32:27.260 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.295 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.407 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Where(uc => uc.UserId.Equals(__user_Id_0)) + .Select(c => c.ToClaim())' +2024-08-24 21:32:27.441 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Client Projections: + 0 -> Dictionary { [Property: IdentityUserClaim.Id (int) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: IdentityUserClaim.ClaimType (string), 1], [Property: IdentityUserClaim.ClaimValue (string), 2], [Property: IdentityUserClaim.UserId (string) Required FK Index, 3] } + SELECT a.Id, a.ClaimType, a.ClaimValue, a.UserId + FROM AspNetUserClaims AS a + WHERE a.UserId == @__user_Id_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:32:27.451 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:32:27.457 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:32:27.464 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.472 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.478 +03:00 [DBG] Executing DbCommand [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:32:27.516 +03:00 [INF] Executed DbCommand (38ms) [Parameters=[@__user_Id_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a].[Id], [a].[ClaimType], [a].[ClaimValue], [a].[UserId] +FROM [AspNetUserClaims] AS [a] +WHERE [a].[UserId] = @__user_Id_0 +2024-08-24 21:32:27.531 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:32:27.534 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.539 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.588 +03:00 [DBG] Compiling query expression: +'DbSet>() + .Join( + inner: DbSet(), + outerKeySelector: userRole => userRole.RoleId, + innerKeySelector: role => role.Id, + resultSelector: (userRole, role) => new { + userRole = userRole, + role = role + }) + .Where(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.userRole.UserId.Equals(__userId_0)) + .Select(<>h__TransparentIdentifier0 => <>h__TransparentIdentifier0.role.Name)' +2024-08-24 21:32:27.652 +03:00 [DBG] Generated query execution expression: +'queryContext => new SingleQueryingEnumerable( + (RelationalQueryContext)queryContext, + RelationalCommandCache.SelectExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT a0.Name + FROM AspNetUserRoles AS a + INNER JOIN AspNetRoles AS a0 ON a.RoleId == a0.Id + WHERE a.UserId == @__userId_0), + Func, + HotelBookingPlatform.Infrastructure.Data.AppDbContext, + False, + False, + True +)' +2024-08-24 21:32:27.662 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:32:27.666 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2024-08-24 21:32:27.672 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.677 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.682 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:32:27.717 +03:00 [INF] Executed DbCommand (35ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:32:27.728 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:32:27.732 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.738 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.783 +03:00 [DBG] Creating DbCommand for 'ExecuteReader'. +2024-08-24 21:32:27.789 +03:00 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2024-08-24 21:32:27.795 +03:00 [DBG] Opening connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.800 +03:00 [DBG] Opened connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.805 +03:00 [DBG] Executing DbCommand [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:32:27.831 +03:00 [INF] Executed DbCommand (26ms) [Parameters=[@__userId_0='?' (Size = 450)], CommandType='"Text"', CommandTimeout='30'] +SELECT [a0].[Name] +FROM [AspNetUserRoles] AS [a] +INNER JOIN [AspNetRoles] AS [a0] ON [a].[RoleId] = [a0].[Id] +WHERE [a].[UserId] = @__userId_0 +2024-08-24 21:32:27.840 +03:00 [DBG] A data reader was disposed. +2024-08-24 21:32:27.843 +03:00 [DBG] Closing connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:27.847 +03:00 [DBG] Closed connection to database 'HotelBookingPlatform' on server '.'. +2024-08-24 21:32:28.160 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:32:28.176 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:32:28.179 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:32:28.182 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:32:28.186 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:32:28.193 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType5`4[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HotelBookingPlatform.Domain.Helpers.AuthModel, HotelBookingPlatform.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2024-08-24 21:32:28.316 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API) in 8133.0961ms +2024-08-24 21:32:28.325 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.UserController.LoginAsync (HotelBookingPlatform.API)' +2024-08-24 21:32:28.359 +03:00 [DBG] 'AppDbContext' disposed. +2024-08-24 21:32:28.374 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/auth/login application/json 78 - 200 - application/json;+charset=utf-8 8564.8194ms +2024-08-24 21:32:33.693 +03:00 [DBG] Connection id "0HN64DC174CMC" received FIN. +2024-08-24 21:32:33.697 +03:00 [DBG] Connection id "0HN64DC174CMC" is closed. The last processed stream ID was 1. +2024-08-24 21:32:33.703 +03:00 [DBG] Connection id "0HN64DC174CMC" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:32:33.716 +03:00 [DBG] Connection id "0HN64DC174CMC" stopped. +2024-08-24 21:33:02.037 +03:00 [DBG] Connection id "0HN64DC174CMD" accepted. +2024-08-24 21:33:02.049 +03:00 [DBG] Connection id "0HN64DC174CMD" started. +2024-08-24 21:33:02.152 +03:00 [DBG] Connection 0HN64DC174CMD established using the following protocol: "Tls13" +2024-08-24 21:33:02.185 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 363 +2024-08-24 21:33:02.193 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/confirm' +2024-08-24 21:33:02.197 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/confirm' is valid for the request path '/api/Booking/confirm' +2024-08-24 21:33:02.201 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:02.204 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:33:02.207 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:33:02.450 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:33:02.457 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:33:02.462 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:02.474 +03:00 [INF] Route matched with {action = "ConfirmBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ConfirmBooking(HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:33:02.483 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:33:02.490 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:33:02.497 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:33:02.507 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:33:02.515 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:33:02.522 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:33:03.028 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:33:03.036 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:33:03.041 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' using the name '' in request data ... +2024-08-24 21:33:03.047 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:33:03.084 +03:00 [DBG] Connection id "0HN64DC174CMD", Request id "0HN64DC174CMD:00000001": started reading request body. +2024-08-24 21:33:03.089 +03:00 [DBG] Connection id "0HN64DC174CMD", Request id "0HN64DC174CMD:00000001": done reading request body. +2024-08-24 21:33:03.139 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' +2024-08-24 21:33:03.145 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:03.152 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:03.156 +03:00 [DBG] Attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:33:03.178 +03:00 [DBG] Done attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:06.912 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:33:06.929 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:33:06.935 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:33:06.941 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:33:06.947 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:33:06.956 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2024-08-24 21:33:06.978 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API) in 4455.9501ms +2024-08-24 21:33:06.982 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:06.987 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 363 - 200 - application/json;+charset=utf-8 4802.0778ms +2024-08-24 21:33:13.733 +03:00 [DBG] Connection id "0HN64DC174CMD" received FIN. +2024-08-24 21:33:13.737 +03:00 [DBG] Connection id "0HN64DC174CMD" is closed. The last processed stream ID was 1. +2024-08-24 21:33:13.742 +03:00 [DBG] Connection id "0HN64DC174CMD" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:33:13.746 +03:00 [DBG] Connection id "0HN64DC174CMD" stopped. +2024-08-24 21:33:49.442 +03:00 [DBG] Connection id "0HN64DC174CME" accepted. +2024-08-24 21:33:49.552 +03:00 [DBG] Connection id "0HN64DC174CME" started. +2024-08-24 21:33:49.573 +03:00 [DBG] Connection 0HN64DC174CME established using the following protocol: "Tls13" +2024-08-24 21:33:49.581 +03:00 [INF] Request starting HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 368 +2024-08-24 21:33:49.595 +03:00 [DBG] 1 candidate(s) found for the request path '/api/Booking/confirm' +2024-08-24 21:33:49.603 +03:00 [DBG] Endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' with route pattern 'api/Booking/confirm' is valid for the request path '/api/Booking/confirm' +2024-08-24 21:33:49.611 +03:00 [DBG] Request matched endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:49.615 +03:00 [DBG] Static files was skipped as the request already matched an endpoint. +2024-08-24 21:33:49.618 +03:00 [INF] No CORS policy found for the specified request. +2024-08-24 21:33:49.627 +03:00 [DBG] Successfully validated the token. +2024-08-24 21:33:49.631 +03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated. +2024-08-24 21:33:49.635 +03:00 [INF] Executing endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:49.639 +03:00 [INF] Route matched with {action = "ConfirmBooking", controller = "Booking"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ConfirmBooking(HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation) on controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API). +2024-08-24 21:33:49.645 +03:00 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2024-08-24 21:33:49.651 +03:00 [DBG] Execution plan of resource filters (in the following order): ["None"] +2024-08-24 21:33:49.658 +03:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)","Microsoft.AspNetCore.Mvc.Filters.ResponseCacheFilter"] +2024-08-24 21:33:49.667 +03:00 [DBG] Execution plan of exception filters (in the following order): ["None"] +2024-08-24 21:33:49.673 +03:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2024-08-24 21:33:49.680 +03:00 [DBG] Executing controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:33:49.688 +03:00 [DBG] Executed controller factory for controller HotelBookingPlatform.API.Controllers.BookingController (HotelBookingPlatform.API) +2024-08-24 21:33:49.694 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:33:49.699 +03:00 [DBG] Attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' using the name '' in request data ... +2024-08-24 21:33:49.705 +03:00 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter' for content type 'application/json'. +2024-08-24 21:33:49.712 +03:00 [DBG] Connection id "0HN64DC174CME", Request id "0HN64DC174CME:00000001": started reading request body. +2024-08-24 21:33:49.717 +03:00 [DBG] Connection id "0HN64DC174CME", Request id "0HN64DC174CME:00000001": done reading request body. +2024-08-24 21:33:49.723 +03:00 [DBG] JSON input formatter succeeded, deserializing to type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' +2024-08-24 21:33:49.728 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:49.733 +03:00 [DBG] Done attempting to bind parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:49.737 +03:00 [DBG] Attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation' ... +2024-08-24 21:33:49.745 +03:00 [DBG] Done attempting to validate the bound parameter 'confirmation' of type 'HotelBookingPlatform.Domain.DTOs.InvoiceRecord.BookingConfirmation'. +2024-08-24 21:33:53.192 +03:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter"] +2024-08-24 21:33:53.201 +03:00 [DBG] No information found on request to perform content negotiation. +2024-08-24 21:33:53.204 +03:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2024-08-24 21:33:53.207 +03:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2024-08-24 21:33:53.211 +03:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response. +2024-08-24 21:33:53.216 +03:00 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2024-08-24 21:33:53.221 +03:00 [INF] Executed action HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API) in 3541.3445ms +2024-08-24 21:33:53.226 +03:00 [INF] Executed endpoint 'HotelBookingPlatform.API.Controllers.BookingController.ConfirmBooking (HotelBookingPlatform.API)' +2024-08-24 21:33:53.230 +03:00 [INF] Request finished HTTP/2 POST https://localhost:7054/api/Booking/confirm application/json 368 - 200 - application/json;+charset=utf-8 3648.5294ms +2024-08-24 21:33:53.784 +03:00 [DBG] Connection id "0HN64DC174CME" received FIN. +2024-08-24 21:33:53.791 +03:00 [DBG] Connection id "0HN64DC174CME" is closed. The last processed stream ID was 1. +2024-08-24 21:33:53.801 +03:00 [DBG] Connection id "0HN64DC174CME" sending FIN because: "The Socket transport's send loop completed gracefully." +2024-08-24 21:33:53.815 +03:00 [DBG] Connection id "0HN64DC174CME" stopped. diff --git a/HotelBookingPlatform.API/Profiles/BookingMappingProfile.cs b/HotelBookingPlatform.API/Profiles/BookingMappingProfile.cs index 5e4e729..8f84ad7 100644 --- a/HotelBookingPlatform.API/Profiles/BookingMappingProfile.cs +++ b/HotelBookingPlatform.API/Profiles/BookingMappingProfile.cs @@ -1,14 +1,14 @@ - -namespace HotelBookingPlatform.API.Profiles; +namespace HotelBookingPlatform.API.Profiles; public class BookingMappingProfile :Profile { public BookingMappingProfile() { CreateMap() - .ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.Status.ToString())) - .ForMember(dest => dest.PaymentMethod, opt => opt.MapFrom(src => src.PaymentMethod.ToString())) - .ForMember(dest => dest.HotelName, opt => opt.MapFrom(src => src.Hotel.Name)) - .ForMember(dest => dest.Numbers, opt => opt.MapFrom(src => src.Rooms.Select(r => r.Number).ToList())); + .ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.Status.ToString())) + .ForMember(dest => dest.PaymentMethod, opt => opt.MapFrom(src => src.PaymentMethod.ToString())) + .ForMember(dest => dest.HotelName, opt => opt.MapFrom(src => src.Hotel.Name)) + .ForMember(dest => dest.Numbers, opt => opt.MapFrom(src => src.Rooms.Select(r => r.Number).ToList())) + .ForMember(dest => dest.UserName, opt => opt.MapFrom(src => src.User.UserName)); CreateMap() diff --git a/HotelBookingPlatform.Application/Core/Implementations/BookingService.cs b/HotelBookingPlatform.Application/Core/Implementations/BookingService.cs index 11233e6..315bcb6 100644 --- a/HotelBookingPlatform.Application/Core/Implementations/BookingService.cs +++ b/HotelBookingPlatform.Application/Core/Implementations/BookingService.cs @@ -26,7 +26,10 @@ public async Task CreateBookingAsync(BookingCreateRequest request, s if (request.CheckInDateUtc >= request.CheckOutDateUtc) throw new BadRequestException("Check-out date must be greater than check-in date."); + // حساب السعر الإجمالي var totalPrice = await CalculateTotalPriceAsync(request.RoomIds.ToList(), request.CheckInDateUtc, request.CheckOutDateUtc); + + // حساب السعر بعد تطبيق الخصم var discountedTotalPrice = await CalculateDiscountedPriceAsync(request.RoomIds.ToList(), request.CheckInDateUtc, request.CheckOutDateUtc); var booking = new Booking @@ -92,35 +95,30 @@ private async Task CalculateTotalPriceAsync(List roomIds, DateTime private async Task CalculateDiscountedPriceAsync(List roomIds, DateTime checkInDate, DateTime checkOutDate) { - decimal totalPrice = 0m; - int numberOfNights = (checkOutDate - checkInDate).Days; + decimal discountedTotalPrice = 0; + var numberOfNights = (checkOutDate - checkInDate).Days; foreach (var roomId in roomIds) { var room = await _unitOfWork.RoomRepository.GetByIdAsync(roomId); - var discount = await _unitOfWork.DiscountRepository.GetActiveDiscountForRoomAsync(roomId, checkInDate, checkOutDate); - - if (room is not null) + if (room != null) { - decimal roomPrice = room.PricePerNight * numberOfNights; - Console.WriteLine($"Room ID: {roomId}, Original Price: {roomPrice}"); - - if (discount is not null) + var activeDiscount = await _unitOfWork.DiscountRepository.GetActiveDiscountForRoomAsync(roomId, checkInDate, checkOutDate); + if (activeDiscount != null && activeDiscount.IsActive) { - if (checkInDate >= discount.StartDateUtc && checkOutDate <= discount.EndDateUtc) - { - decimal discountAmount = (discount.Percentage / 100) * roomPrice; - roomPrice -= discountAmount; - } + var discountPrice = room.PricePerNight * (1 - (activeDiscount.Percentage / 100.0m)); + discountedTotalPrice += discountPrice * numberOfNights; + } + else + { + discountedTotalPrice += room.PricePerNight * numberOfNights; } - - totalPrice += roomPrice; } } - Console.WriteLine($"Total Discounted Price: {totalPrice}"); - return totalPrice; + return discountedTotalPrice; } + public static string GenerateConfirmationNumber() { return Guid.NewGuid().ToString(); diff --git a/HotelBookingPlatform.Application/Core/Implementations/DiscountService.cs b/HotelBookingPlatform.Application/Core/Implementations/DiscountService.cs index 70ea282..c85e80a 100644 --- a/HotelBookingPlatform.Application/Core/Implementations/DiscountService.cs +++ b/HotelBookingPlatform.Application/Core/Implementations/DiscountService.cs @@ -1,5 +1,4 @@ - -namespace HotelBookingPlatform.Application.Core.Implementations; +namespace HotelBookingPlatform.Application.Core.Implementations; public class DiscountService : BaseService, IDiscountService { public DiscountService(IUnitOfWork unitOfWork, IMapper mapper) diff --git a/HotelBookingPlatform.Application/Core/Implementations/InvoiceRecordService.cs b/HotelBookingPlatform.Application/Core/Implementations/InvoiceRecordService.cs index 39a29c0..938b4da 100644 --- a/HotelBookingPlatform.Application/Core/Implementations/InvoiceRecordService.cs +++ b/HotelBookingPlatform.Application/Core/Implementations/InvoiceRecordService.cs @@ -16,7 +16,7 @@ public async Task CreateInvoiceAsync(InvoiceCreateRequest request) public async Task GetInvoiceAsync(int id) { var invoiceRecord = await _unitOfWork.InvoiceRecordRepository.GetByIdAsync(id); - if (invoiceRecord == null) + if (invoiceRecord is null) throw new NotFoundException("Invoice not found"); return _mapper.Map(invoiceRecord); @@ -31,7 +31,7 @@ public async Task> GetInvoicesByBookingAsync(int public async Task UpdateInvoiceAsync(int id, InvoiceCreateRequest request) { var invoiceRecord = await _unitOfWork.InvoiceRecordRepository.GetByIdAsync(id); - if (invoiceRecord == null) + if (invoiceRecord is null) throw new NotFoundException("Invoice not found"); _mapper.Map(request, invoiceRecord); @@ -42,7 +42,7 @@ public async Task UpdateInvoiceAsync(int id, InvoiceCreateRequest request) public async Task DeleteInvoiceAsync(int id) { var invoiceRecord = await _unitOfWork.InvoiceRecordRepository.GetByIdAsync(id); - if (invoiceRecord == null) + if (invoiceRecord is null) throw new NotFoundException("Invoice not found"); await _unitOfWork.InvoiceRecordRepository.DeleteAsync(id); diff --git a/HotelBookingPlatform.Application/Services/EmailService.cs b/HotelBookingPlatform.Application/Services/EmailService.cs index 04c6eaf..ac6bc14 100644 --- a/HotelBookingPlatform.Application/Services/EmailService.cs +++ b/HotelBookingPlatform.Application/Services/EmailService.cs @@ -68,6 +68,7 @@ private string GenerateEmailBody(BookingConfirmation confirmation)

Booking Confirmation

+

Confirmation Number: {confirmation.ConfirmationNumber}

Hotel Name: {confirmation.HotelName}

Hotel Address: {confirmation.HotelAddress}

@@ -75,7 +76,8 @@ private string GenerateEmailBody(BookingConfirmation confirmation)

Check-In Date: {confirmation.CheckInDate:yyyy-MM-dd HH:mm:ss}

Check-Out Date: {confirmation.CheckOutDate:yyyy-MM-dd HH:mm:ss}

Total Price: {confirmation.TotalPrice:C}

-

User Email: {confirmation.AfterDiscountedPrice:C}

+

Discount Percentage: {confirmation.Percentage}%

+

Price After Discount: {confirmation.AfterDiscountedPrice:C}

User Email: {confirmation.UserEmail}

Thank you for booking with us!

diff --git a/HotelBookingPlatform.Domain/DTOs/InvoiceRecord/BookingConfirmation.cs b/HotelBookingPlatform.Domain/DTOs/InvoiceRecord/BookingConfirmation.cs index 30b2e87..afd8d91 100644 --- a/HotelBookingPlatform.Domain/DTOs/InvoiceRecord/BookingConfirmation.cs +++ b/HotelBookingPlatform.Domain/DTOs/InvoiceRecord/BookingConfirmation.cs @@ -10,4 +10,5 @@ public class BookingConfirmation public DateTime CheckOutDate { get; set; } public decimal TotalPrice { get; set; } public string UserEmail { get; set; } + public decimal Percentage { get; set; } } diff --git a/HotelBookingPlatform.Infrastructure/Implementation/DiscountRepository.cs b/HotelBookingPlatform.Infrastructure/Implementation/DiscountRepository.cs index 7bc5c0a..686f3d9 100644 --- a/HotelBookingPlatform.Infrastructure/Implementation/DiscountRepository.cs +++ b/HotelBookingPlatform.Infrastructure/Implementation/DiscountRepository.cs @@ -43,8 +43,8 @@ public async Task GetActiveDiscountForRoomAsync(int roomId, DateTime c { return await _appDbContext.Discounts .Where(d => d.RoomID == roomId && - d.StartDateUtc <= checkInDate && - d.EndDateUtc >= checkOutDate && + d.StartDateUtc <= checkOutDate && + d.EndDateUtc >= checkInDate && DateTime.UtcNow >= d.StartDateUtc && DateTime.UtcNow <= d.EndDateUtc) .FirstOrDefaultAsync(); diff --git a/HotelBookingPlatformApplication.Test/ValidatotTests/HotelCreateRequestValidatorTests.cs b/HotelBookingPlatformApplication.Test/ValidatotTests/HotelCreateRequestValidatorTests.cs index ec0b3f4..f1deee4 100644 --- a/HotelBookingPlatformApplication.Test/ValidatotTests/HotelCreateRequestValidatorTests.cs +++ b/HotelBookingPlatformApplication.Test/ValidatotTests/HotelCreateRequestValidatorTests.cs @@ -67,7 +67,7 @@ public void Should_Not_Have_Error_When_All_Fields_Are_Valid() // Arrange var model = new HotelCreateRequest { - Name = "Valid Hotel", + Name = "The Ritz-Carlton", StarRating = 3, PhoneNumber = "123456789", OwnerID = 1