/// <summary> /// Domyślne pobieranie danych z tabeli Komentarzy /// </summary> /// <returns></returns> public static CommentsViewModel GetDefault() { lock (typeof(CommentsViewModel)) { if (defaultInstance == null) { defaultInstance = new CommentsViewModel(); } } return(defaultInstance); }
/// <summary> /// Pobranie komentarza dla danego Id Produktu /// </summary> /// <param name="deviceId"></param> /// <returns></returns> public static CommentsViewModel GetForDeviceId(long deviceId) { lock (typeof(CommentsViewModel)) { if (instances.ContainsKey(deviceId) != true) { instances[deviceId] = new CommentsViewModel(deviceId); } } return(instances[deviceId]); }