Skip to content

- Uncategorised posts -

Misplaced questions from users. If you find yourself posting in this forum then either try and choose a more appropriate forum, or make a suggestion in the Suggestions forum for a new forum

This category can be followed from the open social web via the handle uncategorised-posts@forum.codeproject.com

1.3k Topics 2.0k Posts
  • mvc

    asp-net database architecture
    2
    0 Votes
    2 Posts
    0 Views
    L
    This looks like an ASP.NET issue so you should post in that forum.
  • .net

    csharp
    2
    0 Votes
    2 Posts
    0 Views
    Richard DeemingR
    If you have a constructor which accepts the property values, then your commented-out line will work. If you don't, an object initializer might help: emp = new EmployeeBLL { ID = Convert.ToString(rdr["ID"]), Name = Convert.ToString(rdr["Name"]), Gender = Convert.ToString(rdr["Gender"]), Email = Convert.ToString(rdr["Email"]), Roles = Convert.ToString(rdr["Roles"]), }; You might also want to look at Dapper[^]: using (var connection = new SqlConnection("...")) { List<EmployeeBLL> employees = connection.Query<EmployeeBLL>( "SELECT ID, Name, Gender, Email, Roles FROM YourTable WHERE SomeCondition = @SomeParameter", new { SomeParameter = "some value" }) .ToList(); ... } Or AutoMapper[^] with the AutoMapper.Data[^] extension: using (var connection = new SqlConnection("...")) using (var command = new SqlCommand("SELECT ID, Name, Gender, Email, Roles FROM YourTable WHERE SomeCondition = @SomeParameter", connection)) { command.Parameters.AddWithValue("@SomeParameter", "some value"); connection.Open(); using (var reader = command.ExecuteReader(CommandBehavior.CloseConnection)) { if (reader.HasRows) { List<EmployeeBLL> employees = Mapper.DynamicMap<IDataReader, List<EmployeeBLL>>(reader); ... } } } (Code based on this StackOverflow answer[^].) "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Present Your Clan with Customized Lapel Pins and Celebrate

    html css com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 아시안카지노≫Ж≪ N G P 7 。C O M ≫Ж≪ 코리아카지노

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Connection

    csharp linq workspace
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • _Employee in shared

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • _Employee in shared

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • _Employee in shared

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • grid.cshtml

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • grid.cshtml

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • mycode

    csharp css asp-net database linq
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • partial

    html com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • partial

    html com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • help

    help
    3
    0 Votes
    3 Posts
    0 Views
    OriginalGriffO
    No. That is not what this site is about. Instead, look at setting up a DropBox account - it 's free and it exists for just that kind of thing. https://www.dropbox.com/[^] Your existing messages are getting abuse votes, so I will delete them. Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
  • Connection

    csharp linq workspace
    2
    0 Votes
    2 Posts
    0 Views
    L
    Please do not do this; you have been reported for abuse of the forums.
  • _Employee in shared

    html css com architecture
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • grid.cshtml

    html css com architecture help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • mycode

    csharp css asp-net database linq
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • unknown why this

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • nodules are institute

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied