Wednesday, January 28, 2009

LINQKit

LINQKit is a free set of extensions for LINQ to SQL power users. It comprises the following:

* An extensible implementation of AsExpandable()
* A public expression visitor base class (ExpressionVisitor)
* PredicateBuilder
* Linq.Expr and Linq.Func shortcut methods

With LINQKit, you can:

* Plug expressions into EntitySets
* Use expression variables in subqueries
* Combine expressions (have one expression call another)
* Dynamically build predicates
* Leverage AsExpandable to add your own extensions.


http://www.albahari.com/nutshell/linqkit.aspx

Monday, January 26, 2009

JQuery - Microsoft Ajax - JSON

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="MicrosoftAjax.js" type="text/javascript"></script>
    <script src="jquery-1.2.6.pack.js" type="text/javascript"></script>
    <script type="text/javascript">
        function serializeJSON(data) {
            return Sys.Serialization.JavaScriptSerializer.serialize(data);
        }

        $(document).ready(function() {
            var value = "Paul";
            alert(serializeJSON({ nom: value }));
        });
    </script>
</head>
<body>
</body>
</html>