EF Migration out of sync
Reddit » C# programming language
by /u/Realistic_Being_2038
59m ago
I have a scenario where EF migrations were used initially to create a database and a model. The migrations were customized to insert seed data for testing. In production the migration was run initially, and then data was migrated in from a legacy database. Over the years manual changes have been made to views, stored procedures, and so on in the production database. Migrations have been changed directly in local development environments, and chema changes were then made manually and then applied to production via scripts and separate code deployments. This has caused the migrations to become ..read more
Visit website
.NET Aspire: Using Databases
Reddit » C# programming language
by /u/shawnwildermuth
59m ago
submitted by /u/shawnwildermuth [visit reddit] [comments ..read more
Visit website
Looking for resources & advice on how to implement information.
Reddit » C# programming language
by /u/barisaxo
59m ago
Using Unity, so the methods I'm aware of are very Unity specific, but I would like to know how it's done outside of Unity's frameworks. Having trouble forming the exact question I'm trying to ask so I'll give you an example: A player is collecting wood of different types: Fir, Pine, and Oak. The wood items have some information about them, a name, modifier (float), and description. I've heard it's not great practice store information like this in C# script. If so what's a better way to go about it? I'm not necessarily looking for direct explanations, though they are welcome. I'm hoping to fin ..read more
Visit website
Trying to write a PST Monitor for any new email
Reddit » C# programming language
by /u/Techie4evr
59m ago
I am using Visual Studio 2022 as my IDE of choice, C# as my program language (Duh!! LOL), and .NET Framework 4.7.2 I am trying to write a Windows Forms program that will monitor a folder in my local PST file for any new email that gets moved there via Outlook rules I have set. Or any unread email in that folder really. Once it see's unread email, it looks for any attachments and will save it to a directory. and will populate a datagrid with the date and time and subject line of each email it finds. Now the code I have, I have ensured it can properly name the Root Folder, and the folder I am t ..read more
Visit website
Writing efficient platform specific Code in C# just got easier
Reddit » C# programming language
by /u/sashakrsmanovic
11h ago
The new Uno update introduces a way to integrate platform-specific code into a Uno Platform class library, and it does so remarkably well. The new feature lets you write code that targets specific platforms within the same project. Here’s a quick example of how you can conditionally compile your application logic for different environments: #if HAS_UNO Console.WriteLine("Uno Platform - Pixel-perfect apps that run everywhere"); #else Console.WriteLine("Windows - Built with Microsoft's own tooling"); #endif #if __ANDROID__ Console.WriteLine("Android only code with net8.0-android"); #elif __IOS_ ..read more
Visit website
WPF UserControl and DependencyInjection
Reddit » C# programming language
by /u/Deord
11h ago
Hey all, I'm hoping someone can point me to a resource describing how to use dependency injection with user controls in WPF. Specifically, how do you declare the user control in XAML (can you?) if don't have a parameterless constructor because you want to inject dependencies? ​ Thanks. submitted by /u/Deord [visit reddit] [comments ..read more
Visit website
Refactor your C# code with primary constructors - .NET Blog
Reddit » C# programming language
by /u/myotcworld
11h ago
submitted by /u/myotcworld [visit reddit] [comments ..read more
Visit website
Ternary Operator question
Reddit » C# programming language
by /u/SemiRetardedClone
11h ago
If I have the following index = numberArray.IndexOf(56) <0 ? 0 : numberArray.IndexOf(56) if the array contains 56, does numberArray get searched twice once for the condition, and then again to assign the result to the variable? submitted by /u/SemiRetardedClone [visit reddit] [comments ..read more
Visit website
C# learning resources for an "experienced" programmer
Reddit » C# programming language
by /u/Scary_Wolf_616
11h ago
I've been programming for a number of years but don't have any experience in C#. I'm looking for an online course or youtube video that is catered to people who already know the fundamentals of programming languages but don't know the syntax and mechanisms of C#. if you know of something like this, please let me know, thanks submitted by /u/Scary_Wolf_616 [visit reddit] [comments ..read more
Visit website
Is this async code safe?
Reddit » C# programming language
by /u/mucusmosesvibration
11h ago
I have a Data class with which a user interacts. I persist the class via SaveUnit in ViewModel (which handles a button press) as below. I've read about the dangers of lockup but they get above my head pretty quickly. Here I'm calling SaveUnit from within OnButtonPress without an "await" on that call. Is that a potential problem? If it is problem and I have to await all the way down from the top (so await DBOPs.SaveUnit(theData) ) where do I put the JsconConvert command? I don't want it inside anything running asynchronously, because the user could be interacting with the Data class at the sam ..read more
Visit website

Follow Reddit » C# programming language on FeedSpot

Continue with Google
Continue with Apple
OR