public int Blog_Insert(Blog_Class obj) { SqlConnection con = new SqlConnection(objCon.ConnectionReturn()); SqlCommand command = new SqlCommand("sp_insertblog", con); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@Header", obj.Header); command.Parameters.AddWithValue("@Description", obj.Description); command.Parameters.AddWithValue("@CreatedBy", obj.CreatedBy); con.Open(); int iNewRowIdentity = Convert.ToInt32(command.ExecuteScalar()); con.Close(); return(iNewRowIdentity); }
public int InsertblogData(Blog_Class obj) { int Return = objModels.Blog_Insert(obj); return(Return); }