public EmployeeInfo GetEmployee(long id) { EmployeeInfo employee = new EmployeeInfo(); //return new List<EmployeeInfo> { new EmployeeInfo { Id=1, Department="FR", Designation="Lead Developer", Name="Ravi K", PhotoPath=@"straoge\container\blob" } }; using (DataTableReader dtr = _employeeDAO.GetEmployee(id).CreateDataReader()) { while (dtr.Read()) { employee = new EmployeeInfo { Id = Convert.ToInt64(dtr["Id"]), Name = Convert.ToString(dtr["Name"]), Department = Convert.ToString(dtr["Department"]), Designation = Convert.ToString(dtr["Designation"]), JoinDate = Convert.ToDateTime(dtr["JoinDate"]), LastUpdated = Convert.ToDateTime(dtr["LastUpdated"]), PhotoPath = Convert.ToString(dtr["PhotoPath"]) }; } } return(employee); }