KeylessDm.cs 580 B

1234567891011121314151617181920
  1. using Microsoft.EntityFrameworkCore;
  2. using Quadarax.Foundation.Core.Data.Entity;
  3. namespace Quadarax.Application.QLiberace.Common.Entities.Base.DaoMapper
  4. {
  5. public class KeylessDm<TEntity> : AbstractDaoMapper where TEntity : QlbrcEntityKeyless
  6. {
  7. public override void Map(ModelBuilder builder)
  8. {
  9. if (builder == null) throw new ArgumentNullException(nameof(builder));
  10. builder.Entity<TEntity>(entity =>
  11. {
  12. entity.HasNoKey();
  13. }
  14. );
  15. }
  16. }
  17. }