C#C
C#3y ago
AceChewy

❔ Creating a server for a messaging app

For a messaging app I'm developing, I've created a contacts collection (code below) which will contain contact items which correspond to a different user, this includes the other user's Username, Profile picture and the most recent message in the chat between you and said user.

However I'm not sure how to create a server which will store this information and then call said information.

(This will have to come later but I think once the server is created, I'll first have to create a sign up option to the application when it's first launched and will ask the user to input a Username, Email and Profile picture (which can then be changed in a settings tab))

using Solaris.MVVM.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solaris.MVVM.ViewModel
{
    class MainViewModel
    {
        public ObservableCollection<MessagesModel> Messages { get; set; }
        public ObservableCollection<ContactsModel> Contacts { get; set; }
        public MainViewModel() 
        {
            Messages = new ObservableCollection<MessagesModel>();
            Contacts = new ObservableCollection<ContactsModel>();

            Messages.Add(new MessagesModel
            {
                
            });
        }  
    }
}
Was this page helpful?