public Guid Add(Guid categoryId, Guid payAcountId, string payName, decimal amount,
             DateTime payDate, string remark)
        {
            var category = new CategoryDomain(categoryId);
            var payPersonal = new PersonalAccountDomain(payAcountId);

            var result = new PublicAccountWaterDomain(category, payPersonal, payName, amount, payDate, remark);
            unitOfWork.Commit();

            return result.Entity.Id;
        }
        public void BatchAdd(DataTable table)
        {
            var types = _categoryRepository.GetAll(CategoryType.Outcome).ToDictionary(t => t.Name, v => v.Id);
            var users =  _personalAccountRepository.GetAll().ToDictionary(t => t.Name, v => v.Id);
            foreach (DataRow row in table.Rows)
            {
                var userName = Convert.ToString(row["付款人"]);
                if (string.IsNullOrWhiteSpace(userName))
                    break;

                var payDate = Convert.ToDateTime(row["支付日期"]);
                var amount = Convert.ToDecimal(row["支出"]);
                var typeName = Convert.ToString(row["类别"]);
                var categoryId = types[typeName];
                var payAcountId = users[userName];
                var remark = Convert.ToString(row["备注"]);

                var category = new CategoryDomain(categoryId);
                var payPersonal = new PersonalAccountDomain(payAcountId);

                var result = new PublicAccountWaterDomain(category, payPersonal, string.Empty, amount, payDate, remark);
            }

            unitOfWork.Commit();
        }