Ejemplo n.º 1
0
        public IActionResult GetAccounts()
        {
            var list = from account in accounts.NotDeleted
                       where Permissions.AccessAccount(account)
                       select account;

            return(Ok(list));
        }
Ejemplo n.º 2
0
        public IActionResult GetAccount(Guid id)
        {
            if (!accounts.Find(id, out var acc))
            {
                return(NotFound());
            }

            if (!Permissions.AccessAccount(acc))
            {
                return(NotFound());
            }

            return(Ok(acc));
        }