zoukankan      html  css  js  c++  java
  • Class

    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq;
    using System.Web;
    
    namespace MvcMusic.Models
    {
        public class Album
        {
            public int AlbumID { get; set; }
            public virtual int GenreId { get; set; }
            public virtual int ArtistId { get; set; }
            public int Title { get; set; }
            public decimal Price { get; set; }
            public string AlbumArtUrl { get; set; }
    
            public virtual Artist Artist { get; set; }
            public virtual Genre Genre { get; set; }
        }
    
        public class Genre
        {
            public virtual int GenreId { get; set; }
            public virtual string Name { get; set; }
            public virtual string Description { get; set; }
            public virtual List<Album> Albums { get; set; }
        }
    
    
        public class Artist 
        {
            public virtual int ArtistId { get; set; }
            public virtual string Name { get; set; }
        }
    
        public class MusicStoreDB : DbContext
        {
            public DbSet<Album> Albums { get; set; }
            public DbSet<Genre> Genres { get; set; }
            public DbSet<Artist> Artists { get; set; }
        }
    }
  • 相关阅读:
    mysql 主从服务器配置
    Linux命令
    Kali
    Python进阶
    性能测试工具
    sphinx搜索
    页面静态化
    PHP API接口
    线程的生命周期
    多线程的创建
  • 原文地址:https://www.cnblogs.com/MarchThree/p/3669845.html
Copyright © 2011-2022 走看看