kamagra how much to take

AspnetPersonalizationperuserCommands Partial Class

This command factory creates static partial classes that generate parameterized database commands to the ASP.NET database, in this case the “personalizationperuser” table. This partial class could be extended to include your own queries if you desired.

  1.  //*****************************************************************************
  2. // This file is part of the data access layer example to the ASP.NET 2.0 provider database
  3. // This file was written by Adam Buenz [WSS MVP] of ARB Security Solutions, LLC
  4. //                  http://www.sharepointsecurity.com
  5. //
  6. // This file and its parts is free for re-distribution, for use in both free
  7. // and commercial applications, however this header must remain intact for legal
  8. // use. The data access layer example is distributed in the hope that it will
  9. // be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. //*****************************************************************************
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Text;
  15. using System.Data;
  16. using System.Data.SqlClient;
  17.  
  18. namespace Aspnet.Provider.Datalayer.Commands
  19. {
  20.         /// <summary>
  21.         /// A command factory class for AspnetPersonalizationperuser objects.
  22.         /// </summary>
  23.         internal static partial class AspnetPersonalizationperuserCommands
  24.         {
  25.                 /// <summary>
  26.                 /// Finds all AspnetPersonalizationperuser objects with a certain Pathid value.
  27.                 /// </summary>
  28.                 /// <param name="pathid">The Pathid value.</param>
  29.                 /// <returns>An IDbCommand that finds all AspnetPersonalizationperuser objects with a certain Pathid value.</returns>
  30.                 public static IDbCommand FindByPathid(Nullable<Guid> pathid)
  31.                 {
  32.                         SqlCommand cmd;
  33.                         if (!pathid.HasValue)
  34.                         cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [PathId] is null");
  35.                         else
  36.                         {
  37.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [PathId] = @pathid");
  38.                                 cmd.Parameters.AddWithValue("@pathid", pathid);
  39.                         }
  40.                         return cmd;
  41.                 }
  42.  
  43.                 /// <summary>
  44.                 /// Finds all AspnetPersonalizationperuser objects with a certain Userid value.
  45.                 /// </summary>
  46.                 /// <param name="userid">The Userid value.</param>
  47.                 /// <returns>An IDbCommand that finds all AspnetPersonalizationperuser objects with a certain Userid value.</returns>
  48.                 public static IDbCommand FindByUserid(Nullable<Guid> userid)
  49.                 {
  50.                         SqlCommand cmd;
  51.                         if (!userid.HasValue)
  52.                         cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [UserId] is null");
  53.                         else
  54.                         {
  55.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [UserId] = @userid");
  56.                                 cmd.Parameters.AddWithValue("@userid", userid);
  57.                         }
  58.                         return cmd;
  59.                 }
  60.  
  61.                 /// <summary>
  62.                 /// Finds all AspnetPersonalizationperuser objects with a certain Pagesettings value.
  63.                 /// </summary>
  64.                 /// <param name="pagesettings">The Pagesettings value.</param>
  65.                 /// <returns>An IDbCommand that finds all AspnetPersonalizationperuser objects with a certain Pagesettings value.</returns>
  66.                 public static IDbCommand FindByPagesettings(byte[] pagesettings)
  67.                 {
  68.                         SqlCommand cmd;
  69.                         if (pagesettings == null)
  70.                         cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [PageSettings] is null");
  71.                         else
  72.                         {
  73.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [PageSettings] like @pagesettings");
  74.                                 cmd.Parameters.AddWithValue("@pagesettings", pagesettings);
  75.                         }
  76.                         return cmd;
  77.                 }
  78.  
  79.                 /// <summary>
  80.                 /// Finds all AspnetPersonalizationperuser objects with a certain Lastupdateddate value.
  81.                 /// </summary>
  82.                 /// <param name="lastupdateddate">The Lastupdateddate value.</param>
  83.                 /// <returns>An IDbCommand that finds all AspnetPersonalizationperuser objects with a certain Lastupdateddate value.</returns>
  84.                 public static IDbCommand FindByLastupdateddate(DateTime lastupdateddate)
  85.                 {
  86.                         SqlCommand cmd;
  87.                         cmd = new SqlCommand("select * from [dbo].[aspnet_PersonalizationPerUser] where [LastUpdatedDate] = @lastupdateddate");
  88.                         cmd.Parameters.AddWithValue("@lastupdateddate", lastupdateddate);
  89.                         return cmd;
  90.                 }
  91.  
  92.         }
  93. }
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>