Beispiel #1
0
        private async void buttonSave_Click(object sender, EventArgs e)
        {
            var client = CollegeServiceClientHelper.GetCollegeServiceClient(_config["RPCService:ServiceUrl"]);

            var results = await client.AddProfessorAsync(GenerateNewProfessor());

            MessageBox.Show($"New Professor Added with Id: {results.ProfessorId}");
        }
        public FormAddNewProfessor()
        {
            InitializeComponent();

            _config = new ConfigurationBuilder()
                      .SetBasePath(Directory.GetCurrentDirectory())
                      .AddJsonFile("appsettings.json").Build();

            _client = CollegeServiceClientHelper.GetCollegeServiceClient(_config["RPCService:ServiceUrl"]);
        }