spit on that Thang CHO BOC
spit on that Thang CHO BOC
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