kamagra how much to take

AspnetUsersDTO Partial Class

A partial data object class for the “users” table in the ASP.NET 2.0 provider database. The relevant data transfer objects contain only the serializable data of a data object.

  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 AspnetUsers objects.
  22.         /// </summary>
  23.         internal static partial class AspnetUsersCommands
  24.         {
  25.                 /// <summary>
  26.                 /// Finds all AspnetUsers objects with a certain Applicationid value.
  27.                 /// </summary>
  28.                 /// <param name="applicationid">The Applicationid value.</param>
  29.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Applicationid value.</returns>
  30.                 public static IDbCommand FindByApplicationid(Guid applicationid)
  31.                 {
  32.                         SqlCommand cmd;
  33.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [ApplicationId] = @applicationid");
  34.                         cmd.Parameters.AddWithValue("@applicationid", applicationid);
  35.                         return cmd;
  36.                 }
  37.  
  38.                 /// <summary>
  39.                 /// Finds all AspnetUsers objects with a certain Username value.
  40.                 /// </summary>
  41.                 /// <param name="username">The Username value ('*' can be used as a wildcard).</param>
  42.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Username value.</returns>
  43.                 public static IDbCommand FindByUsername(string username)
  44.                 {
  45.                         SqlCommand cmd;
  46.                         if (username == null)
  47.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [UserName] is null");
  48.                         else
  49.                         {
  50.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [UserName] like @username");
  51.                                 cmd.Parameters.AddWithValue("@username", username.Replace("*", "%"));
  52.                         }
  53.                         return cmd;
  54.                 }
  55.  
  56.                 /// <summary>
  57.                 /// Finds all AspnetUsers objects with a certain Loweredusername value.
  58.                 /// </summary>
  59.                 /// <param name="loweredusername">The Loweredusername value ('*' can be used as a wildcard).</param>
  60.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Loweredusername value.</returns>
  61.                 public static IDbCommand FindByLoweredusername(string loweredusername)
  62.                 {
  63.                         SqlCommand cmd;
  64.                         if (loweredusername == null)
  65.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [LoweredUserName] is null");
  66.                         else
  67.                         {
  68.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [LoweredUserName] like @loweredusername");
  69.                                 cmd.Parameters.AddWithValue("@loweredusername", loweredusername.Replace("*", "%"));
  70.                         }
  71.                         return cmd;
  72.                 }
  73.  
  74.                 /// <summary>
  75.                 /// Finds all AspnetUsers objects with a certain Mobilealias value.
  76.                 /// </summary>
  77.                 /// <param name="mobilealias">The Mobilealias value ('*' can be used as a wildcard).</param>
  78.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Mobilealias value.</returns>
  79.                 public static IDbCommand FindByMobilealias(string mobilealias)
  80.                 {
  81.                         SqlCommand cmd;
  82.                         if (mobilealias == null)
  83.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [MobileAlias] is null");
  84.                         else
  85.                         {
  86.                                 cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [MobileAlias] like @mobilealias");
  87.                                 cmd.Parameters.AddWithValue("@mobilealias", mobilealias.Replace("*", "%"));
  88.                         }
  89.                         return cmd;
  90.                 }
  91.  
  92.                 /// <summary>
  93.                 /// Finds all AspnetUsers objects with a certain Isanonymous value.
  94.                 /// </summary>
  95.                 /// <param name="isanonymous">The Isanonymous value.</param>
  96.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Isanonymous value.</returns>
  97.                 public static IDbCommand FindByIsanonymous(bool isanonymous)
  98.                 {
  99.                         SqlCommand cmd;
  100.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [IsAnonymous] = @isanonymous");
  101.                         cmd.Parameters.AddWithValue("@isanonymous", isanonymous);
  102.                         return cmd;
  103.                 }
  104.  
  105.                 /// <summary>
  106.                 /// Finds all AspnetUsers objects with a certain Lastactivitydate value.
  107.                 /// </summary>
  108.                 /// <param name="lastactivitydate">The Lastactivitydate value.</param>
  109.                 /// <returns>An IDbCommand that finds all AspnetUsers objects with a certain Lastactivitydate value.</returns>
  110.                 public static IDbCommand FindByLastactivitydate(DateTime lastactivitydate)
  111.                 {
  112.                         SqlCommand cmd;
  113.                         cmd = new SqlCommand("select * from [dbo].[aspnet_Users] where [LastActivityDate] = @lastactivitydate");
  114.                         cmd.Parameters.AddWithValue("@lastactivitydate", lastactivitydate);
  115.                         return cmd;
  116.                 }
  117.  
  118.         }
  119. }
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>