The entity type 'AllVM' requires a primary key to be defined for VM with EF Core
HiI'm trying to return multiple different non related models in one view as aggregate interface page (each one in html tab) with Entity Framework Core (Core 2.1).Holidays model: public class Holidays {...
View Article.NET Core log un-handled exceptions in the console
Hello,I'm currently working on a personal project written in ASP.Net core, due to the way logging is set, unhandled exceptions aren't logged into the Console.When I encounter a problem I usually...
View ArticleASP.Net Core architecture and flow explanation
I would like to understand ASP.Net Core in-depth, so I would understand the entire flow and the components involved from the http request to the response in the case of simple rest API. So not only the...
View ArticleHow to add a list item to a property of type IEnumerable ?
I want to create an `ActionResult` to add a new record. I plan to use the [HttpPost] `ProductEdit(Product model)` method.Question. How to add a list item to a property of type IEnumerable <T>?...
View ArticleSystem.TypeInitializationException: 'The type initializer for...
Hi Team,I am using this namespace using Microsoft.Practices.EnterpriseLibrary.Data; to connect the database.public static Database CreateDatabase(string connectionString,bool isEncrypted=false) { try {...
View ArticleDeploy failed on heroku with asp.net-core webapi dockerized app
Hello everyone,I've been looking for few days many tutorials to try to find my solution but i just can't get it.Overview : Im building an Asp.net Core (3.1) app which i've set up for running on docker....
View ArticleAdd items to a list from view model
Hey how's it going,I'm working on a deck builder for a card game. My rough build is up on https://chronoclashdeckbuilder.azurewebsites.net/DeckBuilder and I have the project on my github...
View ArticleRequired Attribute not working
Hi,I am working in asp.net 2.2 and i am doing model validation globally. below is code using Microsoft.AspNetCore.Mvc.ModelBinding; using System; using System.ComponentModel.DataAnnotations; namespace...
View ArticleMoving from ASP.Net Core 2.2 API to ASP.Net Core 3.1 API: decimals stopped...
Hi,I had an ASP.Net Core 2.2 Web API, with several GET operations where decimals always had the decimal part, even when the value of a property as 0.Now I've changed the target framework to .Net Core...
View Article'ILoggingBuilder' does not contain a definition for 'AddEventLog'
Hi,I am trying to use AddEventLog for Worker Service on ASP.NET Core 3.1.3 I have installed NuGet Microsoft.Extensions.Logging.EventLogProblem is I am getting the error 'ILoggingBuilder' does not...
View ArticleAsp.net Core 3.1 : Missing EF Functionalities ...
Hii've create new asp.net core project with mvc template from my vs 2019 (asp.net core 3.1). now like always, i want to add new entity data model to configure my project from an existing database, but...
View ArticleUnable to locate a local database runtime Installation
I am using container in Docker with asp.net core 3.1. I have one solution with projects on it and one of those is the library where database models using EF Core resides that is reference to the web...
View ArticleEventLogSettings not functioning
Hi,I am trying to set EventLogSettings but the log continues to write to the default Windows Logs -> ApplicationUsing .net 3.1 to build Worker Servicepublic static IHostBuilder...
View ArticleProblem to pass multiple arguments to javascript function inside razor page!
Hii have a simple asp.net core project which display persons with orders for each person.Here is my chtml code :@model IEnumerable<Persons><table class="table...
View ArticleJavascript code not working in partial views!
Hiin my Index view, i load a partial view with jquery.get method. it works correctly. my problem is that in my partialView i've used some javascript code which not working!here is my simple partial...
View ArticleRemote API Access
Hi all, I have a net core 3.1 WebAPI service running on a Linux box on my local LAN as a daemon and it all works as expected.How can I expose the service so it is available outside my Lan ?What I've...
View Articleremote validation firing for unmodified and valid field and blocking form submit
Hi,I have a form which I am loading for user edit . One of the fields is an ID field which I want to check is valid. If I don't modify any of the fields on the form and click submit, the remote...
View ArticleThe entity type 'AllVM' requires a primary key to be defined for VM with EF Core
HiI'm trying to return multiple different non related models in one view as aggregate interface page (each one in html tab) with Entity Framework Core (Core 2.1).Holidays model: public class Holidays {...
View ArticleCan JObject lead to Memory Leaks in High Usage Envrionment?
I am trying to implement solution in asp.net core 3. I need to make few private properties REDACTED for security purposes while logging into file. As JsonDocument is readonly and I cannot use JsonPath...
View Articlepulling a numerical value out of a dropdown box html
Looking for some help on how to pull out a numerical value from a drop down box back into an if statement in a controller:Dropdown box:<div class="form-group"><select class="form-control"...
View Article