spit on that Thang CHO BOC
spit on that Thang CHO BOC
CC#
Created by spit on that Thang CHO BOC on 2/11/2025 in #help
Mapperly Help how to map child CreateDto's?
I have a problem that I cannot solve at the moment I still don't know how to map the properties of the child CreateDto's. Mapperly documentation I didn't find anything about it or just don't understand it. If someone can guide me or help me map this so I can do this to my other entities. MapperProfile: https://pastebin.com/nPFx5uEF This is the DTO I am refering to: https://pastebin.com/s48iuVfk Entity: https://pastebin.com/bcDuveLY
2 replies
CC#
Created by spit on that Thang CHO BOC on 2/10/2025 in #help
BL Mapping help
I have finished my BL DTO's and want to map my DTO with the EF DAL How do I map it when inside the create DTO is a another CreateDTO?
// Table Actions of the table
public List<RestauraceAkceStoluCreateDto> AkceStolu { get; set; } = [];

// All the products in the Table
public List<RestauraceObjednavkaPolozkyCreateDto> Polozky { get; set; } = [];
// Table Actions of the table
public List<RestauraceAkceStoluCreateDto> AkceStolu { get; set; } = [];

// All the products in the Table
public List<RestauraceObjednavkaPolozkyCreateDto> Polozky { get; set; } = [];
https://pastebin.com/8hmUZ2Ay
16 replies
CC#
Created by spit on that Thang CHO BOC on 2/9/2025 in #help
I don't understand this warning: BL Mapping (Mapperly)
The member User on the mapping target type RestauraceNET8.Data.EF.DAL.Entities.Restaurace.RestauraceAkceStolu was not found on the mapping source type RestauraceNET8.Data.EF.BL.DTO.RestauraceDTO.Akce.RestauraceAkceStoluCreateDto It's my first time trying out Mapperly I don't understand why it can't find the Id of the target
10 replies
CC#
Created by spit on that Thang CHO BOC on 2/4/2025 in #help
Keyboard shortcuts always resetting after restart
I always have to set my keyboard shortcut for some reason can anyone help?
16 replies
CC#
Created by spit on that Thang CHO BOC on 2/1/2025 in #help
BL - UserManager custom role
Let's say when registering a new user to the web api. For my use case (since I am doing role based access priority) I need to create a default role "User" I wonder how it is done normally. I am thinking about doing it directly inside the program.cs in the server side In my last project I did it like this hardcode alongside admin user
2 replies
CC#
Created by spit on that Thang CHO BOC on 1/27/2025 in #help
Basics (How does an enterprise do it?) DAL Entity mapper
Currently I am doing a web app since my last small project in the same field (web app in C#) I wanted to ask a difference between (In DAL or even BL) I will be doing my entities like this
public interface IEntityMapper<in TEntity, TKey>
where TEntity : BaseEntity<TKey>
{
void MapToExistingEntity(TEntity existingEntity, TEntity newEntity);
}
public interface IEntityMapper<in TEntity, TKey>
where TEntity : BaseEntity<TKey>
{
void MapToExistingEntity(TEntity existingEntity, TEntity newEntity);
}
using ZelnyTrh.EF.DAL.Entities;
namespace ZelnyTrh.EF.DAL.Mappers;

public class ApplicationUserEntityMapper : IEntityMapper<ApplicationUser>
{
public void MapToExistingEntity(ApplicationUser existingEntity, ApplicationUser newEntity)
{
ArgumentNullException.ThrowIfNull(nameof(existingEntity));
ArgumentNullException.ThrowIfNull(nameof(newEntity));

// Map properties from newEntity to existingEntity
existingEntity.Name = newEntity.Name;
}
}
using ZelnyTrh.EF.DAL.Entities;
namespace ZelnyTrh.EF.DAL.Mappers;

public class ApplicationUserEntityMapper : IEntityMapper<ApplicationUser>
{
public void MapToExistingEntity(ApplicationUser existingEntity, ApplicationUser newEntity)
{
ArgumentNullException.ThrowIfNull(nameof(existingEntity));
ArgumentNullException.ThrowIfNull(nameof(newEntity));

// Map properties from newEntity to existingEntity
existingEntity.Name = newEntity.Name;
}
}
If something like... maybe abstract class or something else would work well. I have another question in my last project i was using AutoMapper for my BL mapping. What I heard was Mapperly being faster if you can give some insight. and also to challenge myself for future proofing what would be the most common enterprise environment solution would have been? (if they even chose C# at all)
21 replies
CC#
Created by spit on that Thang CHO BOC on 1/25/2025 in #help
Performance loss on using united id?
if some entity was using AspNet User (string Id's) what I did was instinctly doing
public interface IEntity<T>
{
T Id { get; set; }
}
public interface IEntity<T>
{
T Id { get; set; }
}
and pass that to every entity i see
68 replies
CC#
Created by spit on that Thang CHO BOC on 1/22/2025 in #help
✅ Correct approach and used in real life OLTP -> OLAP ETLCode first approach!
Hello I am trying to learn on making my very own business Web app it can contain many modules like grocery app, self checkout, restaurant app with OLAP features like getting interesting pie charts and other telemetry... I have done my own OLTP already but there seems to be almost non existent C# tutorials on how to create ETL the Datawarehouse code first approach. I was looking up BI snowflake but it looks like it's for people that already know what they are doing amd it's not code first. Any suggestions? I am currently asking these same questions in GPT O1 model so i would like to double check everything before I start doing things. Also note i have not seen any materials for doing OPS systems also...
33 replies
CC#
Created by spit on that Thang CHO BOC on 11/2/2024 in #help
Web API: structure
Hello, I have finished my DAL -> entities and their db context but what is next i dont know anybody and google didnt help much with my usecase
66 replies
CC#
Created by spit on that Thang CHO BOC on 10/22/2024 in #help
Entity navigation modelling so I can understand it better
No description
2 replies
CC#
Created by spit on that Thang CHO BOC on 10/19/2024 in #help
Web API DAL entities (OnModelCreating)
hello, I need help with object modeling using my created ERD
11 replies