예제 #1
0
        public bool CreateDIY(DIYCreate model)
        {
            var entity =
                new DIY()
            {
                OwnerId        = _userId,
                ProjectName    = model.ProjectName,
                StartDate      = model.StartDate,
                EndDate        = model.EndDate,
                BudgetedAmount = model.BudgetedAmount,
            };

            using (var ctx = new ApplicationDbContext())
            {
                ctx.DIYs.Add(entity);
                return(ctx.SaveChanges() == 1);
            }
        }
예제 #2
0
            public static void Main(string[] args)
            {
                DIY myDIY = new DIY();

                myDIY.PrintReceipt(myDIY.SetUpPurchases());
            }