SysRoleUserSeedData.cs 661 B

1234567891011121314151617181920212223242526
  1. using Furion.DatabaseAccessor;
  2. using Microsoft.EntityFrameworkCore;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace YBEE.EQM.Core.SeedData;
  6. /// <summary>
  7. /// 角色用户种子
  8. /// </summary>
  9. public class SysRoleUserSeedData : IEntitySeedData<SysRoleUser>
  10. {
  11. /// <summary>
  12. /// 种子数据
  13. /// </summary>
  14. /// <param name="dbContext"></param>
  15. /// <param name="dbContextLocator"></param>
  16. /// <returns></returns>
  17. public IEnumerable<SysRoleUser> HasData(DbContext dbContext, Type dbContextLocator)
  18. {
  19. return new[]
  20. {
  21. new SysRoleUser { Id = 1, SysRoleId = 1, SysUserId = 2 },
  22. };
  23. }
  24. }