Skip to main content

All Questions

Tagged with
2 votes
3 answers
395 views

C# Duplicated usage of an if/else condition and a ternary operator. A good practice?

I had a debate with a work mate regarding the following code as to which one of it would be the better practice: My code (in pseudo): var A = <precondition either TRUE or FALSE>; var B; if(A) { ...
Chams's user avatar
  • 29
-3 votes
3 answers
436 views

Can be logic around `List<T>.Enumerator._version` considered control flow exploitation?

List<T>.Enumerator “snapshots” list version upon creation by _version = list._version;. This allows enumerator to halt enumeration when List<T> changed during it. This behavior likely ...
Yarl's user avatar
  • 288
1 vote
2 answers
1k views

Why it is possible to specify a value comparer for ImmutableDictionary<TKey, TValue>?

What is the intended usage of the ImmutableDictionary<TKey,TValue>.ValueComparer property? Why is it useful being able to compare dictionary values by using a specified equality semantic? I ...
Enrico Massone's user avatar
1 vote
1 answer
435 views

Custom File System Index/Cache - How to save index

I've got an extremely oniony(deep) folder structure which contains Appx 1,000,000 text-based files on a network share. Using windows search is extremely slow and unreliable. I've created some text ...
GisMofx's user avatar
  • 379
2 votes
3 answers
2k views

Why is it allowed to refer .net framework libraries in a .net standard library?

.Net Standard is specification. There are two popular implementation of the .net standard specification. ie .Net Core & .Net Framework When I create .Net Standard library, I am allowed to refer ...
Nachiappan Kumarappan's user avatar
-1 votes
2 answers
670 views

How to Mock NamedPipeClientStream

I created a class called MpvController to handle communication protocols over a .NET NamedPipeClientStream. Now, I need to test this controller. I have a second class named MpvControllerFactory that ...
Etienne Charland's user avatar
2 votes
2 answers
1k views

C#: Use Double Await Cause Issues?

We have Application service Method, which extracts data from SQL database using Entity Framework Core . Its Async method along with the Async Controller. Service: public async Task<IEnumerable<...
user avatar
1 vote
2 answers
780 views

Is there still a place for non-async methods in Data Repository?

If we start a .NET Core 3.0 project today, which will use database connection (for example ASP.NET Core Web API), is there still a place for non-async operations while talking to the database? Or in ...
Adam Wojnar's user avatar
0 votes
1 answer
2k views

Should Specification Patterns return IEnumerable, IQueryable, or Expression?

We are implementing Specification Patterns with Domain Driven Design. Company architect also wants us to utilize Generic repository (not my choice). Currently require specification Pattern for Filter ...
Matt Smith's user avatar
1 vote
1 answer
120 views

How to properly handle deployment configuration for Xamarin Forms app

We are currently working on a Xamarin Forms (.NET Core) application. We use Microsofts DevOps for the code repo, building and deployment. Since we want to test newly developed features in a safe ...
Manuel Merzinger's user avatar
1 vote
1 answer
853 views

Data entities in Onion Architecture

I'm trying to build a project using onion architecture (just a "Northwind"ish type app to get more up to speed with .NET Core). I also want to get a better grasp on Onion Architecture principals. I ...
Adam Plocher's user avatar
5 votes
3 answers
2k views

Multithreading ( thread per area ) for an MMO server, good idea?

As a personal project, I'm setting up a MMO, and writing the server in C#/.NET Core. As of now my architecture is as follows: The world exists of different areas ( you can go from area to area trough ...
TanguyB's user avatar
  • 467
2 votes
1 answer
95 views

How best to organise a multitargeted VS solution being ported from .net Framework to both .net Framework+Core?

I'm not a native English speaker, and i'm new to .net Core. I have a task to port the logic of a WPF app to .Net Core while leaving this app working like previously. The app has approximately 70 ...
Andrey K.'s user avatar
10 votes
2 answers
6k views

Which data should be stored as `Claim`?

In ASP.Net Core, I find Claims authorization is very not-concrete method. We can add anything as ClaimType and ClaimValue pair; groups, firstname, lastname, brithdate, canAccessThisURI, isEditor, etc.....
Mohammed Noureldin's user avatar
11 votes
3 answers
3k views

What are the differences between .NET Framework, ASP.NET, .NET Core, ASP.NET Core and .NET Standard?

thanks to the .NET evolution, today we have a lot of different frameworks and technologies. I'm very confused about the differences about it. What is the difference between: .NET Framework ASP.NET ....
Daniel Santos's user avatar

15 30 50 per page