text: ﻿SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  CREATE PROCEDURE [dbo].[usp_Entity2Get]
  	  @someID [int]
  	, @ff [nvarchar](max)
  AS
  BEGIN
  	SET NOCOUNT ON
  
  	SELECT	
  		-- t4-columns begin
  		 [e2].[SomeID]
  		,[e2].[ff]
  		,[e2].[Modified]
  		,[e2].[OtherDate]
  		,[e2].[OID]
  		-- t4-columns end
  	FROM [dbo].[Entity2] [e2]
  	WHERE	
  		-- t4-where begin
  	    [e2].[SomeID] = @someID
  	AND [e2].[ff] = @ff
  		-- t4-where end
  END
  GO
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  CREATE PROCEDURE [dbo].[usp_Entity2GetFiltered]
       @skip int
      ,@count int out
  	,@orderBy nvarchar(512)
  	,@filterBy nvarchar(512)
  	,@retcount bit = 0
  AS
  BEGIN
  	SET NOCOUNT ON
  
  	DECLARE @select nvarchar(max)
      SET @select = 'SELECT	
  		-- t4-columns begin
  		 [e2].[SomeID]
  		,[e2].[ff]
  		,[e2].[Modified]
  		,[e2].[OtherDate]
  		,[e2].[OID]
  		-- t4-columns end
      FROM [dbo].[Entity2] [e2]'
  
  	EXEC [common].[usp_ProcessFilter]
  		     @skip = @skip
  			,@select = @select
  			,@count = @count out
  			,@orderBy = @orderBy
  			,@filterBy = @filterBy
  			,@retcount = @retcount 
  END
  GO
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  