Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The type 'Ortund.Web.Objects.User' cannot be used as type parameter 'T' in the generic type or method 'Ortund.DBBase.OrtundDBBaseObject<T>'. There is no implicit reference conversion from 'Ortund.Web.Objects.User' to 'Ortund.Base.OrtundBaseObject`1<Ortund.Web.Objects.User>'.
- // inherits Ortund.DBBase.OrtundDBBaseObject<Ortund.Web.Objects.User>
- public class UserDBContext : OrtundDBBaseObject<User>
- {
- public UserDBContext()
- : base()
- {
- Property(p => p.Username)
- .HasColumnName("sUsername")
- .HasMaxLength(20)
- .IsRequired();
- Property(p => p.EmailAddress)
- .HasColumnName("sEmailAddress")
- .HasMaxLength(200)
- .IsRequired();
- Property(p => p.Password)
- .HasColumnName("sPassword")
- .HasMaxLength(10)
- .IsRequired();
- Property(p => p.Biography)
- .HasColumnName("sBiography")
- .HasColumnType("text");
- ToTable("Users");
- }
- }
- public abstract class OrtundDBBaseObject<T> : EntityTypeConfiguration<T>
- where T : OrtundBaseObject<T>
- {
- public OrtundDBBaseObject()
- : base()
- {
- HasKey(p => p.PKey);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement