Unable to add scoffolding (RAZOR pages using entity framework (CRUD) in ASP net

Nigel 271 Reputation points
2020-07-02T15:56:14.523+00:00

Effectively, I am hoping to build an online shop which will use either a SQL or Mongo database in asp.net. Being new to this I have tried following along some of the training packages in Microsoft Learn for both webforms and core. when it comes to adding scaffold and (RAZOR pages using entity framework (CRUD)) in either I get the following error :

<<There was an error running the selected code generator. Found invalid data while decoding.>>

11243-crud-error.jpg

most of the tutorials are written for .net framework 2.1 and I am using 3.1 (latest build) is that going to cause the issue? Otherwise, where is this invalid data as non has been entered anywhere.

The class below is in the models folder

using System;  
using System.ComponentModel.DataAnnotations;  
  
namespace RazorPagesMovie.Models  
{  
    public class Movie  
    {  
        public int ID { get; set; }  
        public string Title { get; set; }  
  
        [DataType(DataType.Date)]  
        public DateTime ReleaseDate { get; set; }  
        public string Genre { get; set; }  
        public decimal Price { get; set; }  
    }  
}  
  

and then under pages I have an empty Movies folder in which I am trying to build the scaffold for the db. Any help would be appreciated

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,755 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,726 Reputation points
    2020-07-02T16:00:37.937+00:00

    Hi,

    ASP.NET / .NET Framework is currently not supported in the Q&A forums, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    You can ask the experts in the dedicated forums over here:

    ASP.NET
    https://forums.asp.net

    .NET Framework
    https://dotnet.microsoft.com/platform/community

    (Please don't forget to accept helpful replies as answer)

    Best regards,
    Leon


0 additional answers

Sort by: Most helpful