Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [.net-core]

.NET Core is an open-source, modular implementation of the .NET Framework. It can be used in a wide variety of applications and verticals, ranging from servers and data centers to apps and devices. .NET Core is supported by Microsoft on Windows, Linux and macOS.

1
vote
1answer
44 views

Memory policy with ArrayPool<T>.Shared

i've recently released a from scratch set of library Astron, and I wanted to get my memory policy logic reviewed.(you can find a little doc about it here). My first goal was to provide an extandable ...
7
votes
1answer
166 views

Usage of TPL vs Parallel.ForEach() on file processing

i've been working on an implementation of a my own from scratch set of library Astron and I wanted to get my TPL usage reviewed because i'm not confident with this technology :/ My app is currently ...
-2
votes
0answers
10 views

New ILogger instance for library from IHostedService [closed]

I have a project implementing .Net Core hosting pattern. So I have something like this: ...
3
votes
1answer
99 views

Building QueryString from custom object

I have a custom object that is based in the following models: ...
2
votes
1answer
73 views

ASP.NET Core Request / Response logging middleware

I am looking for feedbacks about my ASP.NET Core Request / Response logging middleware, in particular in ways to lower the memory footprint and string allocations: ...
1
vote
0answers
75 views

Persist payload containing multiple items using EF Core Performance Improvements

I have an .NET Core EF application, setup as Database first, that is supposed to take in a payload containing items to be persisted to my database. They payloads can be huge containing multiple "...
1
vote
1answer
110 views

IEnumerable<T> async serialization

I am building some classes to serialize (in an async / await way) potentially pretty long ...
-2
votes
1answer
57 views

AspNetCore - Injecting a Func<T> [closed]

I have an ASP.NET Core controller I am creating. The controller endpoint looks something like this right now: ...
1
vote
0answers
75 views

Include Serilog sink requiring dependency before dependency injection in .NET Core

Here is a rundown of the situation This is a .Net Core (2.1) application with a console and web front ends. For simplicity this question focuses only on the console end although the web end has the ...
0
votes
0answers
89 views

.NET core controller method to populate jQuery datatable of users and roles

I want to know whether I am following the best practices of using jquery datatable with .net core. In Controller ...
2
votes
0answers
43 views

Generic library for querying various kinds of databases

Since C# 8 and .Net Core 3 are going to be released sometime this year, I wanted to try and convert the library I made to make querying databases easier, implementing the already accepted features (...
2
votes
1answer
54 views

Revision: BinaryTree<T> written in C#

Since my last question (BinaryTree<T> written in C#), I have rewritten my code based on the responses. My project can be found on my GitHub repo here; ...
11
votes
2answers
2k views

BinaryTree<T> written in C#

I've written a binary-tree using .NET Core 3.0. What can I do to improve my coding style? ...
0
votes
0answers
155 views

Upsert with .Net Core Web API

I am using .NET Core 2.2, EF Core and C#. I have created a web API project. I was requested to do an Upsert (insert or update). The entities structure is: Movie User Rating: this is used to give a ...
-2
votes
1answer
103 views

Repository Pattern and SOLID principles [closed]

I have written the following Repository in C#, using NetCore 2.2 and EF Core. I was thinking how to write properly the Search method according to the SOLID principles. This code gives a null ...
4
votes
2answers
315 views

Reading SQL query from a resource, with error logging

I've created a utility class that expects a logger to be passed at a method level, since I prefer legitimate errors to be written out for troubleshooting later on. Another developer hates passing the ...
5
votes
1answer
722 views

Using Span<> and Memory<> to read UTF8 from a socket

I am experimenting with Span<> and Memory<> and checking how to use it for example for reading UTF8 text from a <...
-1
votes
1answer
194 views

Creating a Compatibility Shim for ExampleClass to be targeted both to .net framework and .net core 2.0

Intro: Before showing the actual code for review, let me show you an ExampleClass to create a shim for. ...
1
vote
0answers
68 views

Retrieving OS Platform .NET Core

I'm retrieving the operating system platform with .NET Core with system.runtime.interopservicesI have created the code below and was wondering if there was any other way that I could improve it since ...
0
votes
1answer
540 views

Mocking objects using abstract factory

For some time I am trying to make a mocking library for C# that mocks objects with just 1 line of code. I am using abstract factory pattern to know what is the object's type so that I can work with ...
3
votes
3answers
173 views

Web-app for tracking containers

Nowadays I am learning Domain Driven Design intensively. I am reading the book called Domain Driven Design by Eric Evans, and at the same time I try to apply the knowledge on a real life project I ...
5
votes
1answer
2k views

File path unified in Windows/MacOS/Linux

We are all tremendously happy about back slashes in Windows file systems and do not think that their sole purpose is to make life complicated for smart people who are capable of using different OS. ...
4
votes
0answers
787 views

CSV Data Table Extension

This is my library I wrote from scratch for the .net core that imports and exports CSVs from DataTable objects. I've seen a lot of huge complicated libraries that handle this and a million other ...