SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cs_Feed_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[cs_Feed_Update]
GO

CREATE PROC [dbo].cs_Feed_Update
	@FeedId INT,
	@Url NVARCHAR(255),
	@Title NVARCHAR(255),
	@Link NVARCHAR(255),
	@Language NVARCHAR(10),
	@Generator NVARCHAR(255),
	@SubscribeDate DATETIME,
	@LastUpdateDate DATETIME,
	@FeedStateId INT,
	@LastModified DATETIME,
	@ETag nvarchar(256) = NULL

AS

UPDATE cs_Feed
SET 	Url = @Url,
	Title = @Title,
	Link = @Link,
	Language = @Language,
	Generator = @Generator,
	SubscribeDate = @SubscribeDate,
	LastUpdateDate = @LastUpdateDate,
	FeedStateId = @FeedStateId,
	LastModified = @LastModified,
	ETag = @ETag
WHERE FeedId = @FeedId


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

GRANT EXECUTE ON [dbo].cs_Feed_Update  TO PUBLIC
GO
