/// <summary> /// Create and load a new profile database /// </summary> /// <param name="profile"></param> /// <param name="password"></param> /// <returns></returns> public static async Task <IJiraProfileService> Create(IJiraProfile profile, string password = "") { var service = await FromName(profile.ProfileName, password); service.SetProfile(JiraProfile.From(profile)); return(service); }
protected void SetProfile(JiraProfile profile) { _collection.DeleteMany(e => e.User != ""); _collection.Insert(profile); _db.Commit(); }