I am using ef core and mapster. I have some columns in my db that are nullable.
When I get them from the db, C# stores them as nulls(which makes sense). I want to return these fields are empty strings though when I send them back via my api.
public class CompanyDto
{
public string Website { get; set; }
}
public class Company
{
public int Id { get; set; }
public string Website { get; set; } = "";
}
company.Adapt<CompanyDto>()
what is the best way to make it so Website in the CompanyDto is an empty string.