Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by Yingtingxu.Tools.
- //
- // Copyright (c) yingtingxu(徐应庭). All rights reserved
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- using System;
- using System.Collections.Generic;
- using Microsoft.EntityFrameworkCore;
- namespace Yingtingxu.Tools
- {
- public class CurrencyInfo
- {
- // 字母代码
- public string AlphabeticCode
- {
- get;
- set;
- }
- // 数字代码
- public string NumericCode
- {
- get;
- set;
- }
- // 辅助单位
- public short MinorUnit
- {
- get;
- set;
- }
- // 货币名称
- public string CurrencyName
- {
- get;
- set;
- }
- // 更新时间
- public DateTime ModifyTime
- {
- get;
- set;
- }
- // 创建时间
- public DateTime CreateTime
- {
- get;
- set;
- }
- }
- public class FitArchRoslynContext : DbContext
- {
- public DbSet<CurrencyInfo> CurrencyInfo
- {
- get;
- set;
- }
- public FitArchRoslynContext(DbContextOptions<FitArchRoslynContext> options): base (options)
- {
- }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder.ConfigureCurrencyInfo();
- }
- }
- internal static class ModelBuilderExtensions
- {
- public static ModelBuilder ConfigureCurrencyInfo(this ModelBuilder builder)
- {
- builder.Entity<CurrencyInfo>(b =>
- {
- b.Property(e => e.AlphabeticCode).HasColumnName("Falphabetic_code");
- b.Property(e => e.NumericCode).HasColumnName("Fnumeric_code");
- b.Property(e => e.MinorUnit).HasColumnName("Fminor_unit");
- b.Property(e => e.CurrencyName).HasColumnName("Fcurrency_name");
- b.Property(e => e.ModifyTime).HasColumnName("Fmodify_time");
- b.Property(e => e.CreateTime).HasColumnName("Fcreate_time");
- b.HasKey(e => e.AlphabeticCode);
- b.ToTable("t_currency_info", "fit_arch_roslyn");
- }
- );
- return builder;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement