In this article, we will learn how to get the data from Lotus Notes view and display the records, using ASP MVC list.
Introduction about Lotus Notes
Lotus Notes is a brand of Groupware, which is now owned by IBM. Lotus Notes is used with a variety of local and collaborative server applicatios, including email, calendars, Personal Information Managers (PIM) and the Web.
To know more about Lotus Notes, find the
link.
Step 1
Create a simple form in Lotus Notes to save the records in Lotus notes database. Here, I have created the database "Migration.nsf" and created a form "StudentInformations" to save the student details in Lotus notes.
Steps 2
Insert the records once the form has been designed and create Lotus Notes view to display the saved records.
Step 3
Create a ASP MVC project . Here, I have created a project named "LotusNotestoASPMvc", using Visual Studio 2013.
Step 4
Click OK and dialog Window will appear to select the Application type. Select MVC and Click OK.
Step 4
Once the project has been created, you can find the project solution files in the right corner of VS2013.
Step 5
To access Lotus Notes in Visual studio, we have to add "Interop.Domino" file in our reference folder. To get "Interop.Domino" library file, proceed, as shown below.
Go to Tools -> NuGet Package Manager -> Manage NuGet package for Solution.
Step 6
Now, you can see the dialog Window, which contains "Installed packages"(already installed components), Online (Get components from online). Click Online tab and search the text as "Domino" in search box. Select the "Interop.Domino.dll" and click install button to add the Domino component in our reference folder.
Step 7
Now, you can see the installed "Interop.Domino.dll" in our reference folder.
Step 8
Create a model , select Model Folder > Right Click -> Add new class and name it as "StudentDetails" and click ok. Now, write the code given below in your model.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace LotusNotesTOASPMvc.Models {
- public class StudentDetails {
- public string StudentName {
- get;
- set;
- }
- public double Age {
- get;
- set;
- }
- public string City {
- get;
- set;
- }
- public string Address {
- get;
- set;
- }
- public string PhoneNo {
- get;
- set;
- }
- }
- }