Stack Exchange Network

Stack Exchange network consists of 174 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 [asp.net-core]

The tag has no usage guidance.

0
votes
0answers
28 views

Single Page App with ASP.Net Core: Communication pattern

I'm currently getting my head around solutions for an architecture, in which we develop the client (SPA, Angular) as well as the backend (ASP.net Core). What I'm really interested in is the form of ...
0
votes
1answer
81 views

Onion architecture applied to an .NET application

I am trying to figure out how to translate the onion architecture into an ASP.NET Core WebAPI solution, this is what I ended up with: Let's say I have an application that takes a file path / uri into ...
-1
votes
0answers
62 views

Finding ASP.NET Core 2.1 a struggle to get my head around [closed]

Have a background of Classic ASP, PHP, ColdFusion, debugging ASP.NET etc I am trying my utmost to comprehend ASP.NET Core 2.1 via https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/?...
0
votes
0answers
32 views

Choice between PUT and a separate request for each change for CRUD-based UI

I'm making an HTTP API for ASP.NET Core Identity. Basically what I want is a remote version of this: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.usermanager-1?view=...
0
votes
1answer
44 views

What's the best approach to write chronology entries on certain actions in ASP.NET Core MVC?

I'm working on a software product that entails users opening up a case and taking actions to process the case, changing the status, creating tasks, etc. I'd like to provide a history of the actions ...
-1
votes
1answer
36 views

Writing a blog post website with markdown

so I'm working on a website project with the goal of writing my own blog posts with markdown syntax. I made some thoughts regarding the handling of the markdown and the conversion to HTML, storage ...
-1
votes
1answer
31 views

Creating a mobile app based on the ASP.NET Core website

Coming from Desktop development, I'm in the middle of my very first web project (as a small side/learning-project). I'm using ASP.NET Core 2. I'm already thinking about going mobile too. What are my ...
1
vote
3answers
178 views
+50

Should it be a claim, a role or a policy?

The distinction between roles and claims is that roles describe a set of users and claims describe a property of a user. So there can be a role "Administrator", but there can also be a claim "...
0
votes
2answers
202 views

Unit Test a CRUD Controller MVC

I have looked through answers related to this but they don't seem to solve my problem. I am fairly new unit testing and testing as a whole. I just finished a small web application using ASP.NET Core ...
26
votes
5answers
7k views

Should I check if something exists in the db and fail fast or wait for db exception

Having two classes: public class Parent { public int Id { get; set; } public int ChildId { get; set; } } public class Child { ... } When assigning ChildId to Parent should I check first if ...
4
votes
3answers
523 views

Mapping API models(DTOs) to rich domain models

How to implement HTTP's PUT that works with child collections when using DDD's rich domain models? Let's say we've got an aggregate root with a nicely encapsulated collection of items: (I omitted ...
0
votes
0answers
28 views

Object mapping vs projection with ASP.NET Core

Many examples I see using ASP.NET Core involve one or more of the following: Web app or api that configures a DbContext via dependency injection. A class library that contains a Entity Framework ...
0
votes
1answer
74 views

Dealing with child collections updates in Web API

Let's take some classic enterprise example: Order and OrderItem public class Order { public Guid Id { get; set; } public ICollection<OrderItem> Items { get; set; } } public class ...
1
vote
0answers
38 views

Correct method for handling edit/update scenario in repository pattern

I have a repository pattern employed in my .NET Core 2.1 project. While implementing the edit/update scenario, I have a doubt. My domain: public class Component { public int Id { get; set; } ...
1
vote
1answer
120 views

Entity Framework - extending OR injecting services into DB Context

I fear I'm asking a somewhat silly question, but I'm now completely lost as to which principle I should follow. To my understanding - in terms of Single Responsibility Principle it's best we don't ...
-2
votes
1answer
84 views

How to migrate an existing ASP.NET MVC site to ASP.NET MVC Core - specifically on authorization

I am in the process of upgrading an existing website to ASP.NET Core 2.1. The goal is simplification and ease of maintenance. Existing site is using: EF and .NET 4.6.2 A [Users] table in SQL Server ...
-1
votes
1answer
154 views

What is an example giving the difference between Domain Model and Data Model?

I've seen many articles describing differences between Domain Model and Data Model. However none of the articles have picture representations showing difference. https://stackoverflow.com/questions/...
2
votes
1answer
344 views

What is the difference between a Query Object and a Repository?

What is the difference between Query Object and Repository? Martin Fowler 'Patterns of Enterprise Architecture': “an object that represents a database query.”, Also should a QueryObject always be ...
0
votes
1answer
65 views

Example case of when using ASP.Net w/Angular vs just HTML and Angular would allow provide capabilities the other cant

So I'm trying to justify my case of using ASP.Net Core with Angular in a new application, where the .NET application does little more that provide the basis for the Angular app. It's really similar ...
2
votes
2answers
194 views

C# Namespace Ordering Coding Convention

Is there a general coding convention in ordering namespaces? Is it always order of importance, or alphabetical? Currently I order by main important ones first. I know it does not affect program, just ...
2
votes
1answer
44 views

Abstraction for Account transactions and balance

We have 10 applications which updates account balance table, without logging credit/debit line transactions (not sure why). They all have the pretty much same SQL Statement. In order to get out of ...
0
votes
1answer
49 views

C# Separate Online Store into Different Solutions and Nugets

I am creating an Online Shopping Cart store. It is built through Net MVC Core. There is a Front End View website: html, css, razor. Then we have backend code design for Customers: including shopping ...
0
votes
2answers
57 views

RESTful API authorization for updatable fields

I've got a resource as follows where state is a enum: { id: 123, industry: { id: 245, name: "Farming" }, "scheduleDate": "2018-01-01", "state": "Requested|Approved|Standardized|...
1
vote
2answers
467 views

Stateful authentication in REST API using tokens

I have recently started on a project involving a REST API. The API requires authentication with requirements for administrators to be able to view logged in users and to be able to revoke specific ...
0
votes
0answers
200 views

Update Redis Cache in real time in microservice

I have 2 microservices api in dotnet core microservice1 -------------Database1 ---------------------users_table (gets list of all users) microservice2 -------------Database2 ---------------------...
1
vote
0answers
190 views

Design a Windows Service with self-hosted ASP.NET Core Web Services and UPD port listeners

I'm designing a software platform in automation that is responsible of many different tasks like: Core functions Driver interface for machines UDP listener for machine messages from PLC UDP listener ...
2
votes
1answer
164 views

Best practices for translatable models in Entity Framework Core 2.1+

I'm building an Entity Framework Core-backed ASP.NET Core RESTful service and I have entities / models such as Product, Document etc with description in multiple languages. I want to be able to ...
2
votes
4answers
258 views

Can I assume nobody deletes user generated content off my server's file system?

Situation Currently I'm developing a web service in which users can (generally) upload binary files. These files are stored in the file system of the host OS and some additional metadata about the ...
1
vote
0answers
306 views

Where should I put my enums and interfaces?

I have an asp core MVC project for a college and I would like to implement a timetabling feature. To see if I could successfully even generate a dynamic HTML timetable, I started playing around in a ...
0
votes
0answers
56 views

Should I use CQRS in this case?

I'm building web API. I have a problem where input differs from the output, for example, input expects just the id and output returns entire object. Also, there are few things specific to the output ...
0
votes
1answer
62 views

MVC Core Data Access Naming Convention Folder vs Repository

We have Customer transaction table with many foreign key relationships. We only want to see certain columns of the 3 tables joined in a web interface. Eg just Date, PurchaseAmount, ProductName, ...
1
vote
1answer
553 views

Is .NET ASP MVC core suitable for rapid web development?

I currently work for a company who builds web applications for businesses and entrepreneurs, typically 4-6 projects per year. We currently use Laravel/PHP which allows us to build apps relatively ...
4
votes
1answer
574 views

MVC Core Repository Pattern for Multiple Lookup tables

We have Customer transactional table with multiple lookup tables with foreign keys. We want to create dropdown menus using these lookup tables, when CustomerService creates a Customer order ...
0
votes
1answer
171 views

asp.net Core 2 MVC - best way to send 1000s of emails every day

We need to send 1000s (under 10,000) per day for a few years. The data is in a SQL Server database - we have many asp.net MVC 5 and .net CORE 2 MVC sites on a Windows 2012 R2 server on IIS. The ...
0
votes
1answer
389 views

Controller and API DTO Architecture and class organization in .net core with microservices

We are developing a system with coarse microservice architecture. We have an API that uses controllers and back-end logic with Entity-Framework repository, and several types of clients that use this ...
2
votes
1answer
147 views

ASP.Net MVC When ViewModel properties vs Ajax calls in view

When is it more appropriate to use asynchronous calls from the view to get data vs prepopulating it server-side when creating the instance of the viewmodel? For instance, if my view has some dropdown ...
0
votes
0answers
35 views

Best Approach to have a shared view

I have a website where I want to have a partial view on the page that contains a Singleton service. I am trying to do this with Razor Pages, and have tried Partial Views and ViewComponents, but ...
0
votes
1answer
204 views

Architecture to share logic across MPA and SPA applications

What in your opinion is good practice to handle the case where I want to have re-usable and shared logic that collects and returns my data from the database? For example I have Multi Page ...
0
votes
0answers
28 views

Designing a Data Model For Climbing Gear Checked Out at Events

I am trying to setup an internal use asp.net core 2.0 application to check gear in and out at climbing events. The Model will go something like this: Category.cs (like ice, mountain, etc...) ...
0
votes
2answers
471 views

Is it proper to inject the configuration to the business logic layer?

I have an ASP.NET Core 1.1 application which uses dependency injection and is splitted in 3 layers (web, business logic and data access). I'd like to access to some values of the configuration file ...
0
votes
1answer
152 views

Anonymous Controller/Action within Authorized Site

Say I have an MVC .net core website where 100% of the controllers/methods are behind [Authorize] attributes (complete with policies and all). Would it be taboo, to carve out a set of un-authorized/...
2
votes
1answer
77 views

Validation layer of clustered WebApi solution

Currently I have a design problem, which I am not sure how exactly to solve and what would be the best approach. So what I have is a ASP.NET Core WebApi project which is actually clustered solution. ...
1
vote
1answer
173 views

Creating JWT token internally

I need to implement JWT tokens in my ASP.NET Core API app to handle authorization. My question is, what is the risk of generating my own JWT token within my API app as opposed to having it handled ...
1
vote
0answers
481 views

What is the “recommended” way of using Asp.Net core, Angular, and OpenID-Connect

I mainly just want a lead in a direction with this. I'm not asking about specific frameworks to use, even if I mention them, just how it's supposed to work. I am trying to get an understand of how ...
2
votes
0answers
607 views

Dependency Injection: Creating object factories vs. using inversion of control containers [closed]

When requiring to use dependency injection, I always use IoC containers such as Ninject, Unity, or the built-in one in ASP.Net Core MVC. However, I've just come across the idea of "why not creating an ...
7
votes
2answers
930 views

Can a caller abort an execution of code invoked by HTTP request?

A third party that is going to make HTTP requests to the API that I'm building, requires that the API responds in less than one second. My question is, do they have a way (literally any way, within ...
7
votes
2answers
1k 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.....
2
votes
1answer
1k views

Table Per Concrete Type in Entity Framework Core

I'm trying to port code from entity framework 6 (EF6) to entity framework core 2.0 (EF-Core) and have ran into a dead end. In my EF6 code, I have a base class called Record which defines the base ...
1
vote
1answer
62 views

Most convenient way to implement the models used by the Service Access layer of a Xamarin application

I am new to the Xamarin technology, and I am working on an Asp.NET Core Web application which basically delivers micro-services which will be consumed by a Xamarin.Forms application. So my Web API ...
-1
votes
1answer
479 views

What is the recommended way to storage documents as Microservice / API?

I'am new in Microservices, and this is the scenario. Background: I have an Web Application that requires store and retrieve files and let's say that i need to storage documents (PDFs, Word Documents,...