public static string GetAvatar(this BaseIndividualInformations b) { if (b.Avatar.Content != null && b.Avatar.Content.Length > 0) { var base64 = Convert.ToBase64String(b.Avatar.Content); return(string.Format($"data:{b.Avatar.ContentType};base64,{base64}")); } if (b.Gender == Gender.Male) { return(ViewResourecs.DefultProfilePictureMale); } return(ViewResourecs.DefultProfilePictureFemale); }
public static string FullName(this BaseIndividualInformations b) { return($"{b.FirstName} { b.LastName}"); }