I have an existing project which is developed into 3-tier architecture pattern. It has BLL and DAL .dll files in reference.
Now I want to access a new Stored procedure which already created in ssms to use in this project. I create a method in to .cs file having Stored Procedure Name and Parameters of BLL. build the code and then tried to fetch the particular method from controller but controller didn't fetch the method which i developed in to .cs file.
MetaData File :-
public int AddChapter(string dOCTitleID, string topicalTitleId, string partTitleId, string chapterNumber, string chapterTitles, string parentChapterId);
Method Created in Chapter.cs file :
public int AddChapterSelect(int dOCTitleID, int topicalTitleId, int partTitleId, string chapterNumber, string chapterTitles, int subChapterId) { return dam.ExecuteDataSetByUpdate("USP_AddChapter", dOCTitleID, topicalTitleId, partTitleId, chapterNumber, chapterTitles, subChapterId); }
Stored Procedure
ALTER PROC [dbo].[USP_AddChapter] ( @DOCTitleID int, @TopicalTitleID int, @PartTitleID int, @ChapterNumber nvarchar(50), @ChapterTitles nvarchar(max), @SubChapterID int ) as begin insert into Chapters(DOCTitleID,TopicalTitleID,PartTitleID,ChapterNumber,ChapterTitles,SubChapterID) values(nullif(@DOCTitleID,0),nullif(@TopicalTitleID,0),nullif(@PartTitleID,0),@ChapterNumber,@ChapterTitles,nullif(@SubChapterID,0)) end
Please help out that, how can i update the SP in db and access to my Controller.