AK sanTari
.NET 7 Blazor - add XSS policy
hi all, what is the best way aviod XSS attacks in a .net 7 blazor app?
(my main goal is to prevent users to input scripts (eg. <script>alert('foo');</script>) in any of the text boxes in my app.
For more context i m using web assembly and building the app with WebAssemblyHostBuilder
1 replies
❔ MvvmCross - MvxRecyclerView GetChildAt(position) returns null
i have a problem where GetChildAt returns null for all elements out of view ( i have a MvxRecyclerView with many elements and they don't all fit in the screen - have a scroll component)
GetChildAt work only on all elements that are visible (fit in the screen) when i click a certain button.
There are solution for java/javascript apps but they don't work with xamarin.
Anybody has any idea how to make it work?
2 replies
Dapper map to multiple Dictionaries
I'm using Dapper and .NET core 6 and am trying to map an object with multiple dictionaries in one sql query... is it possible?
The object looks like the following:
I can easily make multiple calls and map them (as follow) but was looking for something nicer.
Being using Slapper for other repo calls but can't find online anything for Dictionaries. Any idea?
Or can a stored procedure do that and Dapper detect and map the object?
1 replies
.NET CORE 6 - Injecting IDbConnection... is it good practice?
I have an api to build and using dapper - IDbConnection. Atm i have an instance of IDbConnection for every db call and i dispose it immediately:
Since i only have one sql database to query, is it good practice to inject the dbConnection on startup?
Will this cause any performance issue since the connection will stay open all the time (if i'm correct)?
5 replies