LANSA has announced Version 3 of LANSA Open for .NET, which gives Microsoft .NET Framework developers access to data and information on remote servers via the LANSA Repository. LANSA Open for .NET Version 3 ships with a class library and includes ready-to-run samples in C#.NET and VB.NET. LANSA for Open .NET does not require additional LANSA software to be installed on the .NET client system.
The new release now includes a Repository Explorer and a Data Model Editor so .NET developers can connect to a LANSA Repository on an IBM i server and inspect the objects defined in the LANSA Repository. An example includes viewing and editing the content of tables in DB2 databases. From the Visual Studio IDE, .NET developers construct a data model for their application from DB2 tables defined in the LANSA Repository. They construct the model by dragging objects from the Repository Explorer to the Data Model Editor. Saving the data model generates the .NET classes and methods that will access the table on the IBM i server from the .NET application.
The C# code to access, for example, an employee table would be as simple as creating a LANSA data context and retrieving the employee details:
// Create a LANSA data context
DataContext context = new DataContext(true);
// Retrieve all fields of an employee with key field EmployeeNumber = "A0070"
var employee = context.Employees.RetrieveItem("A0070");
An IBM i or LANSA administrator can also create data models for use by .NET developers. There is a standalone version of the Repository Explorer and Data Model Editor (not integrated into Visual Studio) for use by IBM i developers or administrators who do not use Visual Studio.
Any .NET applications (written with C# or Visual Basic) can use the business rules defined in the LANSA Repository. No extra effort is required from the .NET developers and they do not need to code business rules in the .NET applications. Multilingual texts (such as field labels, headings and help text) defined in the LANSA Repository are also available for reuse by .NET applications. Not having to duplicate the business rules in the .NET applications increases developer productivity and reduces the ongoing maintenance effort.
With Version 3,.NET developers also have access to IBM i server objects. They can write code to inspect spooled files, issue operating system commands and start programs. Data queues on the IBM i provide messaging services for program-to-program communication. In addition, .NET developers can write programs to use the same messaging services. A program running on the IBM i server and a .NET program can work collaboratively to meet a business requirement by sending messages to each other via data queues.



