| 12345678910111213141516171819202122232425262728293031323334 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class ViewUserLastLoginMap : EntityTypeConfiguration<ViewUserLastLogin>
- {
- public ViewUserLastLoginMap()
- {
- // Primary Key
- this.HasKey(t => new { t.Id, t.UserNo });
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.UserNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.IpAddress)
- .IsFixedLength()
- .HasMaxLength(10);
- // Table & Column Mappings
- this.ToTable("ViewUserLastLogin");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.UserNo).HasColumnName("UserNo");
- this.Property(t => t.TimeLastLogin).HasColumnName("TimeLastLogin");
- this.Property(t => t.IpAddress).HasColumnName("IpAddress");
- }
- }
- }
|