Category "c++sharp"

MongoDB .NET Driver - StartsWith & Contains with loosely typed data

I can use the following for exact matches on loosely typed data in MongoDB: var mongoClient = new MongoClient(con); IMongoDatabase mongoDatabase = mongoClient.G

Unity - How to rename Mesh via script?

I am working on a script to rename Mesh in Unity directly because every time if I rename a FBX file the mesh asset still keep the old name as last time it has b

Unable to decrypt PGP encrypted file into Stream from Azure Blob storage using C# scripting within script task of SSIS

I am trying to read the PGP encrypted file from Azure Blob Storage using SSIS package - Script Task- C# code into Stream, decrypt the file data into string and

How to get and Bind() data from dynamic view in asp.net

I wrote Create() method to create a Test and I input that data- 1)choose from dropdownlist ,for which Course I want to add this Test 2)name 3)description I have

Prevent EF from creating table from subclasses

I have 2 classes; Product and Book. Book is subclass of Product. In my DbContext there is only DbSet of Product. I'm using EF Code-First approach. when EF creat

Log HttpContext.Response.Headers on OnActionExecuted in .NET 6

I'm trying to create an attribute [LogRequest] which will log HTTP request and response with headers. Action controller [HttpGet] [Route("GetCourse")] [LogRequ

Breakpoint not hit in EF Core IEntityTypeConfiguration class on add-migration in PackageManagerConsole

I am doing some discovery in a small test project and am trying to have a breakpoint hit in the configuration definition class. public class TripExpenseComparis

ASP.NET MVC - Populate SelectList with Font-Awesome Icons

I've populated List with font-awesome strings like: private static readonly List<string> Icons = new(){ "<i class=\"fas fa-users\"></i>",

How to count the length of value array in JSON

I have a JSON below: { "value": [ { "name": "504896c031d2fcb9", "location": "North Europe", "properties": { "state": "UNKNOWN",

MissingMethodException when migrating from Ef 6.2 to 6.4.4

For a .net framework 4.8 project, when I update the EF reference from 6.2 to 6.4.4 the application throw an error System.MissingMethodException: Unable find 'V

MAUI - OnPropertyChange not updating the UI

Hi guys I’m working on a MAUI app and I have a problem with the ui not updating every after calling OnPRopertyChanged, here are the details: When calling

Blob Storage - handle files directly on it

I desire an efficient solution to iterate through large files located on blob storage in C#. I want to use the blob storage as a local storage. In my research I

What is a NullReferenceException, and how do I fix it?

I have some code and when it executes, it throws a NullReferenceException, saying: Object reference not set to an instance of an object.

Automapper. How to map custom type property of inner class (source) to string and string array?

I want to map source inner classes to string and in other case string array but in both cases they are mapped to null. I want MapNoteFromInnerSourceEntity1 to h

ASP.Net Core Email Breaks Suddenly Citing SSL Time Mismatch

After noticing that nobody has signed up for a site of mine for a week I tried signing up myself only to be greeted with an error message. Then I tried signing

Error trying modify some attributes of a database table in a controller C#

I´m trying to modify attributes using sql database and web api .Net 6 In a controller i have this method private void SetRefreshToken(RefreshToken newRefr

ProjectTo behaves differently than expected when mapping a member via an interface

I discovered some unexpected behavior in my mappings that might be an AutoMapper bug, but there is enough complexity that I might be missing some nuance, somewh

Don't understand behavior of Tasks in C#

I'm hoping someone can help me understand what seems like some straightforward code. Clearly, I'm missing something. There are 2 things I don't understand about

I've made a code for a assignment but i need a push in the right direction [closed]

i need your guidance for this assignment: At TEC Ballerup Stadium with room for 500 spectators, football matches are played every Sunday at 10

How do i load CheckBoxList from a Selected Value from DropDownList?

i'm trying to do a display database's item(tables, rows, fk,...). I'm stucking at first few step. I loaded the db's names into a DropDownList. But i tried to lo