entity framework

  1. 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...
  2. A

    Hi can anyone tell me why I'm getting a empty list back when executing this entity framework query?

    See code below: public ActionResult<List<string>> FetchConfig([FromBody] FetchConfigDto fetchConfigDto) { List<string> myResult = new List<string>(); _logger.Debug("getting config from database"); try {...
  3. D

    Scaffolding after install the program

    Hi everyone, Is it possible to do scaffolding after install our program and run it? Is using powershell right way to go to do this? Or what else can I do? I need any advice of you. Thank you.
  4. D

    Run Scaffolding Command in C# Code with Powershell Runspace

    Hi, I need to do scaffolding in code. To do this I wrote this method; public string RunScript(string scriptText) { string dir = @"C:\Users\demetsen\source\repos\ScaffoldingInCode\ScaffoldingInCode"; Directory.SetCurrentDirectory(dir); Runspace...
  5. R

    Adding a new property to an existing model

    Hi, I wonder if it is a good practice to add this line of code to production? error: System.InvalidOperationException HResult=0x80131509 Message=The model backing the 'GameContext' context has changed since the database was created. Consider using Code First Migrations to update the...
  6. Gcobani54

    Joining three entities using linq

    Hi Team I need some help in joining three entities using linq, i have one join but the problem i have i am getting a repetion of years, weekNum and day colums with data being incorrect. public IList<ExtractionViewModel> GetExtractionViewModels(string year, int week) {...
  7. M

    Question Same query fired multiple times EF

    I'm building a very simple CRUD web-application (ASP.NET MVC) for tennisplayers and the tournaments they can participate. On a specific page I want to show all tournaments in the database with a title at the top op the page 'All Tournaments' with between brackets the amount of records in the...
  8. etkmlm

    Question Validation Messages Not Working

    Hi, I have an issue with validation messages. I think the problem is caused by 2 post method. [HttpGet] [Authorize] public ActionResult Others(string bid) { return View(ret); } [HttpPost] public ActionResult...
  9. M

    EF returning old data

    Hi everyone, I'm making a very simple CRUD console application using EF and sqlite. I have 3 domain model classes, being: Player, Tournament and TournamentEnrollment public class Player { [Key] public int Id { get; set; } [Required] public string...
  10. M

    Beginners question regarding AsEnumerable()

    I'm following a EF Core (beginners) course and there is something I don't understand. Below you can find the most important classes of a little excercise we got, to get to know EF core and the intent. public class Student { public int StudentId { get; set; } public string...
  11. 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...
  12. P

    How do I convert my SQL query to Entity Framework DBContext

    Hello All, I have one query which I wrote in SQL but now i want to convert it to EF and I am finding difficulty on understanding how do I incorporate multiple select statements in EF SQL Query: SELECT TOP {count} * FROM ( SELECT co.orderid,co.orderStatusId...
  13. M

    Answered Publish .NET Framework on Azure Still Possible?

    I've been trying to launch a .NET Framework web application to Azure, and I can't seem to get it. Every tutorial out there is using, or pushing .NET Core. This is a basic application using C#, .NET Framework 4.7.2 MVC, and connecting to some REST APIs. 1. When deploying .NET Framework app, do...
  14. A

    Question The item with identity [x] already exists in the metadata collection

    Is not more nedded. I try delete the post, but no find this option
  15. M

    Windows Forms application with a shared database

    I am pretty much new in C# programming and desktop applications development. Still, I have a deep understanding of OOP concepts, patterns etc., because I come from other languages/platforms. What I am interested in, are some guidelines / best practices... I am about to to make an app that will...
  16. dipique

    Using custom attributes to contain a target field/property for a search

    Big Picture I maintain a large web application with the primary function of managing orders. It is an MVC over C# application using EF6 for data. There are LOTS of search screens. Right now every search is coded without any code re-use (before my time, I swear!). What I'm Trying To Do I'm...
  17. Fosol

    Visual Studio 2015 RC + Entity Framework 6.1.3 + Oracle ManagedDataAccess 12.1.022

    I'm attempting to develop an application in the new world of Visual Studio 2015 DNX projects. I'm unable to figure out how to get Entity Framework 6.1.3 to connect to Oracle 12c with the Oracle.ManagedDataAccess NuGet Package. I get the following error; "Unable to determine the provider name for...
Top Bottom