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); } }
public static void Main(string[] args) { DIY myDIY = new DIY(); myDIY.PrintReceipt(myDIY.SetUpPurchases()); }