.net core

  1. illud

    Can i pass context in params from controller?

    Hello, im using entity framework, i create context in controller the past into the parameters to service and then repository to make sql queries, is ok to do that? or theres a better way? Controller private readonly DataContextDb _db; public UsersController(DataContextDb contextDb) { _db =...
  2. Algorithme T

    I have an error which says 'House' does not contain a definition for 'Display'

    I initialy created my class which contained constructors and method Each of them has been saved in different files found in different folders , now the methods are in the Services folder and the constructors in Models folder using HouseMS.Models; namespace HouseMS.Services { internal...
  3. A

    Question What telement mean here and when it use it?

    I work on .net core 6 vs 2022 i see function have telement but i don't know what this mean can you show me please ? and when use it are there are any thing best from using telement or more general What I have tried: public List<TElement> SQLQuery<TElement>(string sql, string...
  4. MonsterMMORPG

    My C# and ASP.NET Core MVC Lecture Videos

    Hello everyone. My name is Furkan Gözükara. I am a Ph.D. computer engineer from Turkey. I have a software engineering dedicated Youtube channel named: SECourses : https://www.youtube.com/SECourses I want to share a few of my lecture playlists. The playlists contain the full course for free...
  5. S

    Resolved Process of Building Web Apps

    Hi everyone, I would like to build a menu display system for tablets(no ordering feature). I have defined some endpoints for my API and it works (I'm using .NET Core and PostgreSQL) There are three main projects in a solution I guess: - Frontend for customer (Angular v13) - Backend for...
  6. S

    JSON Error when attempting to consume data from an external API.

    System.AggregateException HResult=0x80131500 Message=One or more errors occurred. (Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[OpenAQAirQuality.Models.City]' because the type requires a JSON array (e.g. [1,2,3]) to...
  7. S

    Does anyone know why i might be getting the following CORS error?

    I have the following task to do: "The goal of this exercise is to build a web client that interacts with this API. It should be able to send different parameters to the API, and display the air quality results for a given city in a friendly manner. The client only needs to support the...
  8. S

    subtracting minutes from a DateTime

    Can anyone help me subtracting minutes from a DateTime public DateTime AddMinutes(double value); if (connection.Value.Disconnected > DateTime.Now - AddMinutes(AppConfig.current.DisconnectTimerMins)) { } Can anyone help me with this? Thanks
  9. S

    Resolved Digital Menu Display System Database Design (EntityFramework Core)

    I would like to develop a digital display menu system which doesn't include any ordering feature. Currently I get stuck in handling entity relationship between menu list and menu item. Should I use a mapping table for them? or I can simply handle menu items inside menu list instead of creating...
  10. K

    Question Customize output in hosted CLR (.NET)

    Hi, I'm hosting CLR in Golang program (but it doesn't matter where). Is the way to configure CLR to capture output from .NET assembly executed in my in-process CLR runtime straight into a file? I run .NET assembly in hosted CLR and I want to capture this output straight to the file (or some buffer).
  11. Siwar Ha

    edmx in .net core

    im new to .net core and im trying to add edmx to my project and this is not available for .net core i want to know if .net core is always code-first and i need to write all by code ? I have 3 layers for my application : 1. DATALAYER 2. SERVICELAYER 3. AND API All in .net core what...
  12. S

    How to set up a chatbot?

    I want to get my chatbot up and running asap, so i can start playing around with it/creating simple dialogue systems etc. I want to have something which can build on overtime and in the end have a sophisticated conversational AI. On another forum they suggested that I use the virtual assistant...
  13. Dragon4ik

    Resolved Alghoritm of autocompleting puzzles

    I have a task to write a programm, which slice the image into the equal rectangle puzzles . Then the program must solve this puzzle without knowing the way it was sliced. I wrote the code, but it works time after time and i can't understand what problem is. Thank you in advance for any help...
  14. etkmlm

    Resolved Entity Framwork Not Working

    i have a problem with Entity. Want to use Entity in DbContext class but it is not working even though I added it to the packages. So when i write the "System.Data.Entity", it turns red. (Error: CS0234) Maybe Visual Studio doesn't see the Entity package. Visual Studio 2019 .NET Core 2.0...
  15. R

    Condition between ArrayChar and int number how to do?

    Hi; I am not getting the condition to interpret char array with integer : string AjusteICMSDocumentoId = "102345"; char[] array = entidade.AjusteICMSDocumentoId.ToCharArray(); if (array[1] == 0) { if (viewModel.TipoImposto !=...
  16. M

    Resolved How to Implement DbSet and DbContext in Service-Repository Architecture?

    I am updating my .NET Core web app from just MVC to a Service-Repository pattern. My question is, how do you implement DbSet<> when you add the Service and Repository layers? I originally added these to my ApplicationDbContext file under the Data folder. Is this still correct? Then would I just...
  17. M

    Question Proper Folder Structure

    This might be too broad of a topic, but how are you supposed to set up a file structure when using .NET Core MVC. When creating a new project, you are given the following: >>Dependencies >>Properties >>wwwroot >>Areas >>Controllers >>Data >>Models >>Services >>Views >>appsettings.json...
  18. M

    MVC to MRC (Model Razor Controller)?

    I've been trying to learn .NET Core after first learning the Framework structure. I am still learning regular views, which utilize Razor code, but I'm coming across a lot of Razor page info. Is it now, or will it ever be a structure of Models, Razor Pages, and Controllers? -A curious learner.
  19. K

    parallel calls - How to Identify which call failed?

    I am new to Parallel call in .Net core, please help me. I am making Parallel call, so I would like to know here if any calls fails in If one of out of many calls fails or all calls failed then we should write to logs specific which Permanent ID got failed. Please help me how to Identify which...
Top Bottom