public NewRelationshipViewModel()
 {
     Title    = "New relationship";
     RelaType = new ObservableCollection <UserRelationshipType>();
     userRelationshipTypeService = new UserRelationshipTypeService();
     LoadRelaTypeCommand         = new Command(async() => await ExecuteLoadItemsCommand());
     Post = new Command(async() => await PostRelationship());
 }
 public RelationshipDetailViewModel(int id)
 {
     Title             = "Details";
     Relationship      = new Relationship();
     Relationship.Name = "test";
     Id = id;
     userRelationshipTypeService = new UserRelationshipTypeService();
     LoadItemCommand             = new Command(async() => await ExecuteLoadItemsCommand());
 }
        public RelationshipTypeViewModel()
        {
            Title    = "Relationship";
            RelaType = new ObservableCollection <Relationship>();
            userRelationshipTypeService = new UserRelationshipTypeService();
            LoadRelaTypeCommand         = new Command(async() => await ExecuteLoadItemsCommand());

            MessagingCenter.Subscribe <NewRelationshipTypePage, string>(this, "AddRelationshipType", async(obj, relationshipType) =>
            {
                await userRelationshipTypeService.PostRelationshipType(relationshipType);
            });
        }