コード例 #1
0
        public void Add(Contribution contrib, double res)
        {
            var contributions = Contribution.SingleOrDefault(c => c.Name == contrib.Name);

            if (contributions == null)
            {
                Contribution.Add(contrib);
                Contrib.Add(contrib, res);
                Save();
            }
            else
            {
                Contrib.Add(contributions, res);
                Save();
            }
        }