Пример #1
0
        public void CreateCategory(Category c)
        {
            var tResult = db.Database.SqlQuery<int>("EXEC CreateCategory @name, @householdId, @expenseTF",

                new SqlParameter("name", c.Name),
                new SqlParameter("householdId", c.HouseholdId),
                new SqlParameter("expenseTF", c.ExpenseTF)).First();
        }
Пример #2
0
        public void EditCategory(Category c)
        {
            var tResult = db.Database.SqlQuery<Category>("EXEC EditCategory @name, @expenseTF, @categoryId",

                new SqlParameter("name", c.Name),
                new SqlParameter("expenseTF", c.ExpenseTF),
                new SqlParameter("categoryId", c.Id)
                );
        }