Answers for "How to create a page in aspnet"

C#
0

How to create a page in aspnet

dotnet aspnet-codegenerator razorpage -m Movie -dc dataClass -udl -outDir Pages/<page_name> --referenceScriptLibraries

<!-- data/dataClass.cs -->

using Microsoft.EntityFrameworkCore;

namespace Project.Data
{
    public class dataClass : DbContext
    {
        public dataclass (
            DbContextOptions<dataClass> options)
            : base(options)
        {
        }

        public DbSet<Project.Models.<model_name> <page_name> { get; set; }
    }
}
Posted by: Guest on June-04-2020

Code answers related to "How to create a page in aspnet"

C# Answers by Framework

Browse Popular Code Answers by Language