.NET Forum » C# forum software

C# forum software

As you know, this forum is available in the form of source codes and the sources are in plain C# programming language.

The forum app does not rely on any third-party libraries or dependencies and utilizes all the modern features of the C# 4.0 programming language. Including generics, extension methods and linq. The latter is used with the built-in very simple ORM (Object-Relational Mapper) to access the forum database.

Here's a sample code snippet from the C# sources:

//open the connection
using (DbConnection cn = DB.CreateOpenConnection())
  //get typed "User" object from the DB using forum's simple ORM
  var res = cn.ExecuteOrm<UserInfo>(
    @"SELECT UserName, Email, ActivationCode
    FROM ForumUsers WHERE UserID=? AND Disabled=?",
    userId, true);
  if (!res.Any()) return;

  string username = res.First().UserName;
  string code = res.First().ActivationCode;
  string email = res.First().Email;

more whitepapers C# forum software

.NET Forum