private static Profile ToDomain(ProfileEntity entity) { return(new Profile( entity.Id.ToString(), entity.FirstName, entity.LastName, entity.Gender, entity.DateOfBirth, entity.City)); }
public async Task <string> InsertAsync(Profile profile) { var profileEntity = new ProfileEntity { City = profile.City, DateOfBirth = profile.DateOfBirth, FirstName = profile.FirstName, LastName = profile.LastName, Gender = profile.Gender }; await context.AddAsync(profileEntity); await context.SaveChangesAsync(); return(profileEntity.Id.ToString()); }