IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
After you Locations module: Implement the data model of the Locations module, you need to implement the view model class for the web service that calls the module.
Web services in Sitefinity CMS follow the MVVM pattern and therefore you must implement a view model class. To do so:
public
class
LocationItemViewModel : ContentViewModelBase
{
}
LocationItemViewModel()
:
base
()
LocationItemViewModel(LocationItem location, ContentDataProviderBase provider)
(location, provider)
this
.Address = location.Address;
.City = location.City;
.Region = location.Region;
.PostalCode = location.PostalCode;
string
Address {
get
;
set
; }
City {
Region {
PostalCode {
protected
override
Content GetLive()
return
.provider.GetLiveBase<LocationItem>((LocationItem)
.ContentItem);
Content GetTemp()
.provider.GetTempBase<LocationItem>((LocationItem)
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important