//Service File Code [OperationContract] public List<comboFill> GetBranch() { using (Entities context = new Entities()) { return (from c in context.BranchMasters select new comboFill { Name=c.Name, }).Take<comboFill>(10).ToList<comboFill>(); } } public class comboFill { public string Name { get; set; } } //Form Code private void Page_Loaded(object sender, RoutedEventArgs e) { var client= new ServiceReference1.AlumniServiceClient(); client.GetBranchCompleted += (s, ea) => { // cboBranch.Items.Add(ea.Result); dataGrid1.AutoGenerateColumns = true; dataGrid1.ItemsSource = ea.Result; }; client.GetBranchAsync(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)