public void Update(ProfileContract user) { using (var dbConnector = new DBConnector()) { ProfileManager profileManager = new ProfileManager(dbConnector.DataContext); var userEntity = ProfilesTranslator.ConvertToProfileEntity(user); profileManager.Update(userEntity); } }
public void Add(ProfileContract profile) { using (var dbConnector = new DBConnector()) { ProfileManager profileManager = new ProfileManager(dbConnector.DataContext); var profileEntity = ProfilesTranslator.ConvertToProfileEntity(profile); profileManager.Add(profileEntity); } }