Esempio n. 1
0
        public void AcceptOrder(int orderId)
        {
            var order = _context.Orders.Find(orderId);

            order.IsFinally = true;
            _context.Orders.Update(order);
            _context.SaveChanges();
        }
Esempio n. 2
0
        private void AddPermissionsToRole(int roleId, List <int> permission)
        {
            foreach (var p in permission)
            {
                _context.RolePermissions.Add(new RolePermission()
                {
                    PermissionId = p,
                    RoleId       = roleId
                });
            }

            _context.SaveChanges();
        }