示例#1
0
        protected Income GetIncome(int?id)
        {
            Income income = db.Incomes.Find(id);

            if (income == null)
            {
                return(null);
            }
            else if (income.User.Id == user.Id)
            {
                income = income.Populate(user);
            }
            else
            {
                return(null);
            }
            return(income);
        }