1、ef中设计成byte[],如下:
/// <summary>
/// 会员证
/// </summary>
public class MemberCard : AuditedEntity<Guid>
{
/// <summary>
/// 企业id
/// </summary>
public Guid CompanyId { get; set; }
/// <summary>
/// 图片地址
/// </summary>
public byte[] ImgUrl { get; set; }
}
使用abp中的dotnet ef migrations add AddTable_MemberCard
生成如下longblob类型:
ImgUrl = table.Column<byte[]>(type: "longblob", nullable: false, comment: "证书图片url"),
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BaseService.Migrations
{
/// <inheritdoc />
public partial class AddTableMemberCard : Migration
{