Skip to main content

All Questions

Filter by
Sorted by
Tagged with
9 votes
4 answers
4k views

DDD Architecture for an e-commerce website (uploading images)

Problem Description I am working on an e-commerce website, when a user wants to sell a product, he would open the product page and he can upload up to 12 photos: Image Upload Process This is the ...
Hooman Bahreini's user avatar
2 votes
1 answer
396 views

Design Pattern for initializing Properties of a ViewModel which only serves a display purpose

It's a question which lies me for years on the tongue. Given a LoginViewModel: ...
Christian Gollhardt's user avatar
5 votes
1 answer
5k views

ASP.NET Core 2 architecture and design patterns

I started a week ago to split my project into layers: business logic layer, data access layer and UI layer. I took as an example this project: https://github.com/dotnet-architecture/eShopOnWeb. I ...
ursachan's user avatar
2 votes
2 answers
351 views

EventLogger for MVC application

I have worked on one application related for booking space and required to store activity of user into table and access from admin side. For that I have created one database entity and ...
Lalji Dhameliya's user avatar
2 votes
1 answer
393 views

Apply Coupon Validation in Order

I have created a mvc application for booking space. In this for booking user can applied coupon for booking. I have implemented one coupon service and validate coupon. ...
Lalji Dhameliya's user avatar
7 votes
3 answers
2k views

CQS implementation with decorators

Edit I've put all this into a nuget package and on github under "MetalCore.CQS" at https://github.com/MetalKid/MetalCore.CQS End Edit I've created a "framework" or more of a ...
Daniel Lorenz's user avatar
1 vote
2 answers
886 views

Implementing Search method For a Class

In my web app, I have a view where users can search in receipts and drafts. I've implemented this ability in search method at my view model, but I'm not sure if this is the best place to put it. So I'...
Akbari's user avatar
  • 179
5 votes
1 answer
4k views

Is it an anti-pattern to let ViewModel fill itself from a domain object? [closed]

Let's say you have a Employees table mapped to a Employee class. Now you want to code a Edit page for general information. You need a ViewModel with all the properties you need to build the page, so ...
Pluc's user avatar
  • 161
7 votes
2 answers
3k views

ViewModel creator design

I am trying to move some logic outside my controller for creating my view models for the view. I have a lot of queries to fire to make sure the complete view model is ready, so to keep my ...
janhartmann's user avatar
5 votes
3 answers
4k views

Returning a validation error from a command handler

...
User 12345678's user avatar
15 votes
2 answers
40k views

Unit of work + repository + service layer with dependency injection

I am designing a web application and a windows service and want to use the unit of work + repository layer in conjunction with a service layer, and I am having some trouble putting it all together so ...
Guillermo Gomez's user avatar
2 votes
4 answers
3k views

Thin controller design

We have asked to keep the MVC controller as thin, so we decided to move all the service calling/business logic into the ViewModel class. But is it good approach to use a ViewModel class to make a ...
user avatar
2 votes
2 answers
174 views

How to declutter dependencies?

I'm running into a problem with my code in a ASP.NET MVC application. Maybe it's not a problem and I'm just being paranoid, but it seems like a problem to me (might be because I've just read the book ...
mboldt's user avatar
  • 131