How to update Objects using SqlConnection – Reactjs
I am new in ASP.NET and I would like to update SQL object by user's id. I read about Entity Framework, but I am used to use SqlConnection. User's id is valid, because the same Id I am using in…
I am new in ASP.NET and I would like to update SQL object by user's id. I read about Entity Framework, but I am used to use SqlConnection. User's id is valid, because the same Id I am using in…
I have created a simple one-to-many hierarchy using the code first approach. All entities in the hierarchy have an Id, which is a Guid, and timestamps for CreatedOn and LastUpdate. These are contained in the BaseEntity class. Each entity may…
I have a JSON string { "F1": { "BF1":"BV1", "BF2":"BV2" }, "F2":"BF1" } and I wish to assign it to an object of this type public class MyType { public string F1 {get;set;} public string F2 {get;set;} } in other…
I have a .NET core project (EntityRelationship) and enable the Gzip compressor for that project. Program.cs using EntityRelationship.Data; using Microsoft.AspNetCore.ResponseCompression; using Microsoft.EntityFrameworkCore; using System.IO.Compression; var builder = WebApplication.CreateBuilder(args); // Add services to the container. ... builder.Services.AddResponseCompression(options => { options.EnableForHttps =…
I create an ASP.NET web application running on .NET Framework 3.5. While writing code, I find that it does not throw error even I use language features which are not supported in .NET Framework 3.5. This code is compiled successfully:…
I am trying to navigate from the main Menu Index to my CreateJob file: I am also needing to give the user Id with the link. I tried 3 different ideas: <li><a href="../Jobs/CreateJob?id=test">Job anlegen3</a></li> <a asp-page="../Jobs/CreateJob?id=test">Job anlegen</a> @Html.ActionLink("Job anlegen", "Jobs",…
I have two code section in both of them I'm trying to use Func<Task>. Can anyone point out the difference between below two code sections. Which approach should I follow. static void Main(string[] args) { Func<Task<int>> getter = async ()…
is there a way to manipulate the properties of a Model into another property? I need to generate the FullName based on the supplied LastName and FirstName properties of my Model. public class User { public string Username { get;…
We have 2 servers. 10.30.1.1 is the application server and 10.30.1.2 is the storage server. Now, we need to read and write files from application server to storage server folder. We are simply using File.Writexxx and File.Readxxx methods but getting…
Lets say I have an entity like so: public class Event { public Event(DateTime happenedAt) { HappenedAt = happenedAt; } public DateTime HappenedAt { get; } } I'm returning it via ASP.NET like so: return Ok(new Event(DateTime.Parse("2023-04-09 09:35:19.527"))); On the…