Asp.net – Correct way to approach composite foreign key
I have multiple classes X, Y, Z: public class X { public int Id { get; set; } public virtual List<Image> Images { get; set; } } public class Y { public int Id { get; set; } public virtual…
I have multiple classes X, Y, Z: public class X { public int Id { get; set; } public virtual List<Image> Images { get; set; } } public class Y { public int Id { get; set; } public virtual…
I'm creating a Web site using C#/Asp.net. I want to minimize object creation by setting some classes and properties as static. But I don't want those objects to be reused by subsequent calls to the Web server. I want the…
Here's a C program to introduce the problem. #include <stdlib.h> #include <stdio.h> #include <math.h> int main(int argc, char *argv[]) { if(argc != 2) { printf("Provide a number to indicate the number of bytes (in Mega)n"); exit(8); } int num =…
[Function("TimerTrigger_EveryMinute")] public async Task TimerTrigger_EveryMinute( [TimerTrigger("0 * * * * *")] TimerInfo timerInfo, [DurableClient] DurableTaskClient starter) { _logger.LogError($"Running timer trigger"); string instanceId = await starter.ScheduleNewOrchestrationInstanceAsync("ORCHESTRATOR_TRIGGER_NAME"); await starter.WaitForInstanceCompletionAsync(instanceId); _logger.LogInformation($"Completed orchestration with ID = '{instanceId}'"); } [Function("ORCHESTRATOR_TRIGGER_NAME")] public async Task Run( [OrchestrationTrigger]…
I'm currently migrating functionalities from an old HTTP API to a new HTTP API. Several endpoints of the api expect objects with nullable boolean values as a JSON object in the requestbody. Modelcode: public class StatusRequest { public bool? Status…
I work on a company's bff project. That's why we throw so many http calls. The project is coded with .Net5 . I saw that HttpClient was used when making Http calls, and I thought it would be better if…
I have a .NET application that’s trying to connect to a SQL Server instance running in a Docker container. I’m using Docker Compose to manage my services, which include my .NET application and SQL Server. Here’s the relevant part of…
I have a JSON string, which I am splitting in 2 different string. But I want to use that to validate some condition. Here is the split of json string: string[] strMyObjects = jsonString.Split(','); And getting it in string like…
When I try to update my .EDMX with update model from database, I get the following error: Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints…
I want to detect specific word or pattern in the all source code files. For ex. if I want to restrict DateTime.Now to be used in the project but if some team member has used this in the source code,…