Reddit » .NET
1,106 FOLLOWERS
Reddit is a network of communities based on people's interests. A sub-Reddit for discussion and news about Dot Net technology. Check out the posts and share your knowledge and opinions on topics related to .NET. Find out where can you start with .NET as a web developer.
Reddit » .NET
52m ago
So I have multiple .NET applications that live in VS solutions (across multiple repositories) that I run simultaneously. Some of these solutions have multiple projects that need to run simultaneously on startup (fine)
I'm looking for a tool that allows me to, for each solution/repository, select the relevant git branch and build/run the apps without having to open all the solutions in visual studio every time. I've messed around with batch files but it's fiddly and I want a nice tool ?? I'm struggling to believe this isn't a problem someone has already tried to solve? I figured I should ask t ..read more
Reddit » .NET
52m ago
https://preview.redd.it/ensdovx9imwc1.png?width=557&format=png&auto=webp&s=a60bf0de899851783bc506126da300e7eb3972f7
https://preview.redd.it/itdev7lfimwc1.png?width=890&format=png&auto=webp&s=43106bc81b1a72267185da9567b5166972fdd56e
https://preview.redd.it/pq958sjhimwc1.png?width=1283&format=png&auto=webp&s=4b4c7f41c7c4f6838e28438babc8ae91e588c260
Edit:
I have 1 and half year of coding&C# experience so if this looks stupid. It is okay.
The main goal about this design was just try a different way. Beacuse all the code examples that i've seen was using th ..read more
Do I need to create a new migration after removing converters from Ef Core in ConfigureConventions ?
Reddit » .NET
2h ago
Hi, I'm working on an existing project and I had to upgrade it to use .NET 8, and since .NET 8 and EF Core 8 now support TimeOnly and DateOnly I had remove these lines from the ConfigureConventions Method ``` configurationBuilder.Properties<DateOnly>() .HaveConversion<DateOnlyConverter>() .HaveColumnType("date");
configurationBuilder.Properties<TimeOnly>() .HaveConversion<TimeOnlyConverter>() .HaveColumnType("time");
```
public sealed class DateOnlyConverter : ValueConverter<DateOnly, DateTime> { public DateOnlyConverter() : base(dateOnly => dateOnly.ToDat ..read more
Reddit » .NET
2h ago
I am designing an application that would send notifications of upcoming lessons for students, based on a given schedule.
First there will be a service that runs every day and extracts all the subjects from a pdf and saves them into database as subjects.
Example:
Title: Math
Day: Monday (will be saved as 1 in db to allow working with DayOfWeek enum)
Time: 13:00
Faculty Group: AA-1
So my database would have a list of such subjects.
Then I would have another background service that every day, say at 6 am makes a query: Give me all subjects with the current DayOfWeek.
For each of them I want to s ..read more
Reddit » .NET
5h ago
Hi folks,
For a .NET core application I have a ILoggedInUserService interface which has a GetLoggedInUser method which is supposed to return the name of the current logged in user from HttpContext. In my repository methods I am injecting that so I can use that save auditing fields like CreatedBy UpdatedBy etc.
Now, my backgroung jobs are using the same repository methods, but how do I set different LoggedInUserName? Ideally, I dont wanna change the implementation of ILoggedInUserService and put some logic in there to check if HttpContext user is null, return admin or some default value. What ..read more
Reddit » .NET
6h ago
I have old code that is using .Net Core 5 and SQL Server. I managed to update it to use .Net Core 8 using the .NET Upgrade Assistant, but since I am developing on a Linux machine, I am using Postgres instead of SQL Server. After making the change, the code builds fine but I am unable to create the first migration. I am getting this error.
shell Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions' while attempting to activate 'UserManagement.Domain.UserContext'.' was thrown while attempting to create an in ..read more
Reddit » .NET
7h ago
Hello everyone!
I'm Pradeep, and I'm thrilled to have joined this vibrant tech community.
As a seasoned .NET developer with 3 years of experience, I'm passionate about creating robust and scalable software solutions. My expertise lies in ASP.NET core.I'm currently on the lookout for remote job opportunities where I can contribute my skills and collaborate with talented individuals. Whether it's developing innovative applications, optimizing existing systems, or tackling new challenges, I'm eager to dive in and make an impact.Outside of coding, I enjoy playing chess, make small 3D animation cl ..read more
Reddit » .NET
8h ago
Hi,
I have an issue wherein old controllers seems to be OK but the new controller I created gets this Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I already allowed any origin on my CORS but still getting the same error. This only happens when I deploy my app.
https://preview.redd.it/5ehcrstqekwc1.png?width=213&format=png&auto=webp&s=8a5c0b523d5ede6f8869ecdce1ba94455281e453
https://preview.redd.it/vycqueptekwc1.png?width=215&format=png&auto=webp&s=f717e0e9eaa ..read more