All Questions
981
questions
2
votes
3
answers
68
views
The problem of mapping in creating a Generic Method
This Is My Models :
public class Result1
{
public string Price { get; set; }
public string Id { get; set; }
}
public class Result2
{
public string firstName { get; set; ...
1
vote
0
answers
18
views
Issue with Conditional Mapping in Abstract and Derived Classes Leading to EF6 SaveChanges Error
The OfType part of the query doesn't work as expected, and there’s an error when saving changes in the database.
Code:
using System;
using System.Data.Entity;
using System.Data.Entity....
0
votes
0
answers
33
views
How to map value objects in dapper
i have the following entity
using MedRaise.Domain.Enums;
namespace MedRaise.Domain.Entities;
public class Appointment : Entity
{
private Guid _clinicId;
private DateTime _date;
private ...
0
votes
0
answers
21
views
How to use ApplyConfigurationsFromAssembly?
Solution structure:
Domain
Entities
Data
Context
MyDbContext.cs
Maps
20+ configs
MyApp – startup project
Currently I'm applying configs like this:
protected override void OnModelCreating(...
1
vote
1
answer
35
views
What is the core difference between the map(s,d) and map<d>(s)
I have a Api method PATCH like this
[HttpPatch("{id}")]
public async Task<IActionResult>UpdateCity(int id, [FromBody] JsonPatchDocument<CityUpdateDto> patchDoc)
{
var ...
0
votes
0
answers
74
views
Mapster - Can I use mapping with constructor and default values for ignored properties?
I try to map from class A to class B, where B is missing a property of A, using Mapster.
Usually, you do this with .Ignore(e => e.Property) but I use a non-default constructor for initialization (...
1
vote
1
answer
144
views
AutoMapper - how to set up a single mapping for two distinct use cases?
I have a situation there where I get some data about trips from an API. I'm using AutoMapper to map this "API model" to an EF Core entity for storing in my SQL Server database.
Most of the ...
0
votes
0
answers
166
views
Performing PACE PIN authentication using C# and nfc card : Chip Authentication with ECDH
I want to implement Chip Authentication with ECDH in C#.
I have configured je PACE PIN and when i use PlatinumReader with the CAN its work, but i want to implement that on my application.
I have ...
0
votes
1
answer
135
views
Using Mapperly Library for Custom Constructor Mapping C#
I am currently utilizing the Mapperly library and encountering an issue with generating a mapper. I am working with two classes, which are defined as follows:
class Class1
{
public int Version { ...
0
votes
1
answer
87
views
c# AutoMapper - Defining a Map in multiple places
A project I'm working on (still in .NET Framework, in case that matters) uses AutoMapper for two separate projects that use the same Database and share a LOT of the same view model classes from a ...
0
votes
0
answers
67
views
How to configurate conditional mapping with different conditions - mapster
I have a part of code that works for in the service.cs but I need move to this code and conditons to mapping. This is my origin code:
location.Documents.ForEach(x => {
var ...
0
votes
2
answers
57
views
Entity Framework 6 - update entity value during loading
I have a table in SQL Server which has encrypted data in one column. But not for all rows, there is a complex logic in the background.
On the other side, I have a web app which uses Entity Framework 6 ...
0
votes
1
answer
102
views
How to map DTO properties to those in a domain object when there is a class hierarchy in C#
Introduction
To put it simple, assume we have 3 classes in the domain (I call them business objects, BOs). I leave out constructors and other stuff, only the properties are relevant, more or less.
...
0
votes
1
answer
87
views
Mapping values to a direction
been trying to figure this out for ages now.
Was trying to figure out a way to have my joystick when moved in any direction represent the numbers shown on the image in that direction.
I essentially I ...
-1
votes
1
answer
57
views
C# Merge Null Or Not Existing Properties and its properties from strongly typed Model after deserialization
The problem is I have a config which I can update using my Model, I deploy new update and user won't get updated configuration file, so it will cause null reference exception, etc. Now I just set ...