小编Pau*_*ler的帖子

asp.net MVC 4模型[关键字]属性无法识别

using System;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;

//my model
public class Roll
{
    [Key]
    public uint Id { get; set; }
    public long RandomSeed { get; set; }
    public string Expression { get; set; }
    public DateTime DateCreated { get; set; }
    public long Total { get; set; }
}

//my context
public class DiceboxContext : DbContext
{
    public DbSet<Roll> Rolls { get; set; }
}

//my controller 

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc model

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

model ×1