Quantcast
Channel: User Simon_Weaver - Stack Overflow
Browsing index pages (165 articles)

Comment by Simon_Weaver on Visual Studio incredibly slow when renaming files

The worst thing about this is you feel like an idiot for renaming a file. Still a problem btw. Renaming in Explorer seems to usually work better.

View Article


Comment by Simon_Weaver on How to send data back from MudDialog

Why is it async? If you close it with an explicit value why do I need to await it? Weird. What am I missing?

View Article


Answer by Simon_Weaver for Entity Framework Core 8 Where IN vs Where IN OPENJSON

.NET 10 has changed it againEF 10.0 introduces a new default translation mode for parameterized collections, where each value in the collection is translated into its own scalar parameter:SELECT...

View Article

Answer by Simon_Weaver for How can I get all errors from ASP.NET MVC modelState?

During debugging I find it useful to put a table at the bottom of each of my pages to show all ModelState errors.<table class="model-state"> @foreach (var item in ViewContext.ViewData.ModelState)...

View Article

Comment by Simon_Weaver on Why is OnInitializedAsync() called twice on a page...

You can assume it's the first time if RendererInfo.IsInteractive == false

View Article


Comment by Simon_Weaver on Why is OnInitializedAsync() called twice on a page...

There is a new attribute in .NET 10 to make things easier : [PersistentState] (described in the link provided above)

View Article

Comment by Simon_Weaver on How can I programmatically determine the Blazor...

Warning: Google AI search results is currently suggesting @inject RendererInfo RendererInfo but that's not correct! It is already a property, and if you inject it you'll override it - making it...

View Article

Answer by Simon_Weaver for Apexcharts: Align xTicks and labels with beginning...

I tried way too long to get this to work with any combination of different options already suggested. I even managed to get it working such that redrawing the graph put them where I wanted, but then...

View Article


Angular / Ivy error : Error: Token InjectionToken XXXXXXXXX is missing a...

Getting the error after updating to Angular 9 / Ivy compilerERROR Error: Token InjectionToken XXXXXXXXX is missing a ɵprov definition. at injectableDefOrInjectorDefFactory (vendor.js:47105) at...

View Article


Image may be NSFW.
Clik here to view.

Answer by Simon_Weaver for Stop chrome back/forward two finger swipe

Chrome Settings > 'Swipe Between Pages'It's been promoted from a flag to a full feature, and apparently didn't respect my original choice 😡.Just go to Settings and search for gesture.

View Article

Answer by Simon_Weaver for DbFunctions.TruncateTime LINQ equivalent in EF CORE

The DateOnly type (since .NET 6) can be quite useful here:group events by DateOnly.FromDateTime(events.DateTimeFrom)I find it generaly much nicer to get a truncated date back as the DateOnly type,...

View Article

Comment by Simon_Weaver on Stop chrome back/forward two finger swipe

Anyone else get irrationally furious when this happens?

View Article

Answer by Simon_Weaver for DbFunctions.TruncateTime LINQ equivalent in EF CORE

I still don't know why truncation isn't supported, but one way is using DateFromPartsOrderMonth = EF.Functions.DateFromParts(o.OrderDt.Year, o.OrderDt.Month, 1)Which gets translated pretty efficiently...

View Article


Comment by Simon_Weaver on Using a 'using alias = class' with generic types?

Sad :-) I wanted to do using GroupingExpression<TSource, TGroupingKey> = Expression<Func<TSource, TGroupingKey>>;

View Article

Comment by Simon_Weaver on DbFunctions.TruncateTime LINQ equivalent in EF CORE

If you don't assign it gets converted to a dynamic getdate() function call in SQL. If you assign to a local variable then that date value is fixed. I like to do the now = DateTime.Now thing because a...

View Article


Comment by Simon_Weaver on Unable to Hot Reload on Visual Studio 2022

And it must be exactlyDebug, not a secondary debug-like config. Trust me on this one.

View Article

Comment by Simon_Weaver on Unable to Hot Reload on Visual Studio 2022

Cannot stress this one enough! If your configuration is not called exactly Debug then it will not recognize changes, even if you refresh and even if the console says it 'Hot Reloaded'. The little check...

View Article


Comment by Simon_Weaver on Unable to Hot Reload on Visual Studio 2022

What, why, how, huh?

View Article

Answer by Simon_Weaver for JobStorage.Current property value has not been...

Having issues with errors like this with RecurringJob?'Current JobStorage instance has not been initialized yet. You must set it before using Hangfire Client or Server API. For .NET Core applications...

View Article

Comment by Simon_Weaver on Azcopy error "This request is not authorized to...

Everybody spent way too much time on this!

View Article
Browsing index pages (165 articles)


Latest Images