Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. .Net Core Master Details entry

.Net Core Master Details entry

Scheduled Pinned Locked Moved .NET (Core and Framework)
asp-netquestioncsharpdotnetarchitecture
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sanket164
    wrote on last edited by
    #1

    Hello All, This is my first application in asp.net core Table Like this ->

    PublisherMater : PublisherId,PublisherName,TotalBooks
    PublisherDetails: BookName,ReleaseDate,AuthorName

    My question is : I want to manage master and details entry using asp.net core mvc with code first approch. first step : Create Model secound : Create MVC Controller with view using Entity Framework anybody have any example like this ? Thanks in advance

    D L 2 Replies Last reply
    0
    • S sanket164

      Hello All, This is my first application in asp.net core Table Like this ->

      PublisherMater : PublisherId,PublisherName,TotalBooks
      PublisherDetails: BookName,ReleaseDate,AuthorName

      My question is : I want to manage master and details entry using asp.net core mvc with code first approch. first step : Create Model secound : Create MVC Controller with view using Entity Framework anybody have any example like this ? Thanks in advance

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Your tables are bad. You should not be putting "TotalBooks" in the PublisherMaster table at all. What you should be doing is something closer to this:

      public class Publisher
      {
      public int PublisherId { get; set; }
      public string PublisherName { get; set; }

      public ICollection PublishedBooks  { get; set; }
      

      }

      public class Book
      {
      public int BookId { get; set; }
      public string BookTitle { get; set; }
      public string AuthorName { get; set; }
      public Date? ReleaseDate { get; set; }
      }

      Every publisher can publish any number of books, hence the collection in the class.

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • S sanket164

        Hello All, This is my first application in asp.net core Table Like this ->

        PublisherMater : PublisherId,PublisherName,TotalBooks
        PublisherDetails: BookName,ReleaseDate,AuthorName

        My question is : I want to manage master and details entry using asp.net core mvc with code first approch. first step : Create Model secound : Create MVC Controller with view using Entity Framework anybody have any example like this ? Thanks in advance

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        The famous "Library Management" assignment (vs The Hospital Management System). (Couldn't find the "PUBS" database ... but I'm sure it's somewhere). [Library Management using ASP.Net MVC (Part 1) Books CRUD Function – alexcodetuts](https://alexcodetuts.com/2017/12/10/library-management-using-asp-net-mvc-part-1/)

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups