Ejemplo n.º 1
0
        public static async Task <Member> GetMember(this MyCouchStore db, string name)
        {
            var members = await db.GetAllAsync <Member>();

            var result = members.FirstOrDefault(member => member.Name.ToLower() == name.ToLower());

            if (result == null)
            {
                throw new CommandFailedException($"User with name {name} is not in the backend database... Go ask Keith about it");
            }
            else
            {
                return(result);
            }
        }