Пример #1
0
        public Policy?GetPolicy(string id)
        {
            var context = new GitPolicyContext(_connectionString);
            var policy  = context.Policies.FirstOrDefault(x => x.Id == id);

            return(policy?.ToPolicy());
        }
Пример #2
0
        public IEnumerable <Policy> GetPolicies()
        {
            var context = new GitPolicyContext(_connectionString);

            return(context.Policies.Select(x => x.ToPolicy()));
        }