public static streams InsertNewStream(int user, DateTime dateTime, string name)
        {
            var table = context.GetTable <streams>();

            var tempStream = new streams
            {
                userId = user,
                start  = dateTime,
                title  = name
            };

            table.InsertOnSubmit(tempStream);
            Submit();
            GetNextStream();
            return(table.FirstOrDefault(s => s.userId == user && s.start == dateTime && s.title == name));
        }
        public static void GetNextStream()
        {
            Table <streams> table;

            try
            {
                table = context.GetTable <streams>();
            }
            catch (Exception e)
            {
                Console.WriteLine("Irgend so ein fehler");
                Logger.Log(e.Message, 2);
                return;
            }

            NextStream = table?.Where(s => s.start > DateTime.UtcNow)?.OrderBy(s => s.start)?.FirstOrDefault();
        }
 private void detach_streams(streams entity)
 {
     this.SendPropertyChanging();
     entity.user = null;
 }
 private void attach_streams(streams entity)
 {
     this.SendPropertyChanging();
     entity.user = this;
 }
 partial void Deletestreams(streams instance);
 partial void Updatestreams(streams instance);
 partial void Insertstreams(streams instance);