private void BindData() { var p1 = new PersonT() { ID = 10, Name = "Person 1", CreditRequest = "Credit Request 1" }; var p2 = new PersonT() { ID = 20, Name = "Person 2", CreditRequest = "Credit Request 2" }; var list = new List <PersonT> { p1, p2 }; GridView1.DataSource = list; GridView1.DataBind(); }
public async Task <PersonT> Get_ById(int id) { var person = new PersonT(); try { if (id > 0) { person = await _repository.Get_ByIdAsync(id); } else { person = null; _logger.LogError("Bad Id parameter", id); //Serilog } } catch (Exception ex) { person = null; = null;