zoukankan      html  css  js  c++  java
  • asp.net mvc entity framework 数据库 练习(一)

    本文启发的思路来源于asp.net mvc 6 的entity framework,微软MSDN中的官方项目contoso university 虚构的数据库

    原文链接如下;

    https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

    针对项目中的实际需求,考虑使用的数据结构包括:生产线员工,生产线设备,产品型号,工艺数据等信息。

        public class UserInfo
        {
            public string UserID { get; set; }
            public string UserName { get; set; }
            public int UserAge { get; set; }
            public string UserSkill { get; set; }
            public string UserJob { get; set; }
            public string UserRole { get; set; }
            public string UserStatus { get; set; }
            public string UserFingerPrint { get; set; }
            public string UserTeamNum { get; set; }
            public DateTime UserTime { get; set; }
            public string UserPassword { get; set; }
    
            public virtual ICollection<DeviceInfo> DeviceInfoes { get; set; }
            public virtual ICollection<ProductInfo> ProductInfoes { get; set; }
        }
        //Device 
        public class DeviceInfo
        {
            public int DeviceID { get; set; }
            public string DeviceName { get; set; }
            public DateTime? DeviceTimeBought { get; set; }
            public DateTime? DeviceTimeUseAll { get; set; }
            public DateTime? DeviceTimeUserAfterMaintain { get; set; }
            public DateTime? DeviceTimeUseThisTime { get; set; }
            public DateTime? DeviceMaintainTime { get; set; }
            public string DevieceUser { get; set; }
            public string DeviceBelonging { get; set; }
            public string DeviceRunCycyle { get; set; }
            public string DevicepartNum { get; set; }
            public int? ProductID { get; set; }
            public string UserID { get; set; }
    
            public virtual UserInfo UserInfo { get; set; }
            public virtual ProductInfo ProductInfo { get; set; }
    
        }
        public class ProductInfo
        {
            public int ProductID { get; set; }
            public string DeviceID { get; set; }
            public string UserID { get; set; }
            public int ProductpipeLineNum { get; set; }
            public int ProductOrderNum { get; set; }
            public string ProductMark { get; set; }
            public float? ProductParameter { get; set; }
            public float? ProductDifference { get; set; }
            public float? ProductRunOut { get; set; }
            public string ProductRivetPart { get; set; }
            public string ProductRivet2Part { get; set; }
            public string ProductRubPart { get; set; }
            public string ProductHubPart { get; set; }
            public string ProductSuckPart { get; set; }
            public string ProductPadPart { get; set; }
            public string ProductTeamNum { get; set; }
            public string ProductStatus { get; set; }
            public DateTime? ProductStartTime { get; set; }
            public DateTime? ProductFinishedTime { get; set; }
            public bool ProductResult { get; set; }
    
            public virtual UserInfo UserInfo { get; set; }
            public virtual DeviceInfo DeviceInfo { get; set; }
    
    
        }
        //ParameterData
        public class ParameterDate
        {
    
            public DateTime? PDPickTime { get; set; }
            public string PDRunout { get; set; }
            public string PDDifference { get; set; }
            public string PDPressure { get; set; }
            public string PDStatus { get; set; }
            public string PDCountID { get; set; }
            public string ProductID { get; set; }
    
            public string DeviceID { get; set; }
            public string UserID { get; set; }
    
            public virtual UserInfo UserInfo { get; set; }
            public virtual ProductInfo ProductInfo { get; set; }
            public virtual DeviceInfo DeviceInfo { get; set; }
        }

    通过设计数据库将数据关联起来,实现crud操作,下一节内容继续按照文章的思路继续。

  • 相关阅读:
    《芒果TV》UWP版利用Windows10通用平台特性,率先支持Xbox One平台
    Win10《芒果TV》内测版现已支持在国行版 Xbox One 下载体验
    Win10《芒果TV》商店内测版更新至v3.1.6:率先支持Xbox One平台
    HLS(HTTP Live Streaming)学习和探讨
    喜迎Win10周年版,芒果TV UWP完善手机视频离线下载
    Windows10 1607 x64/x86 + Office 2016 Win/Mac + KMS激活/安装密钥汇总
    Win10商店芒果TV UWP版更新,新增后台视频下载
    Win10 UWP版《芒果TV》v2.4.0直播超女,芒果台综艺一网打尽
    (三)3-3 Python的一般形式和参数
    (三)3-1 练习
  • 原文地址:https://www.cnblogs.com/ThreeS/p/9535530.html
Copyright © 2011-2022 走看看