Beispiel #1
0
        public static Task AddCluster(ClusterModel model)
        {
            var foundService = _serviceRepo.FindById(model.ServiceId);

            if (foundService == null)
            {
                throw new Exception("Service Does Not Exist, To Create a Cluster a Valid Serice Should Exist");
            }

            return(_repo.Create(model));
        }
        static void Main(string[] args)
        {
            var rq = new ClusterRepository();

            rq.Create(new ClusterModel
            {
                Id                  = "123",
                Gateway             = "11",
                LoadDistributorType = 0,
                MaxSize             = 12,
                Name                = "idk"
            });

            Console.WriteLine();
            Console.Read();
        }