public int Create(SchedularTask item)
 {
     if (_items.Contains(item))
     {
         return(item.Id);
     }
     item.Id = _items.Count == 0 ? 1 : _items.Max(r => r.Id) + 1;
     _items.Add(item); return(item.Id);
 }
        public void Edit(int id, SchedularTask item)
        {
            var db_item = GetById(id);

            if (db_item is null)
            {
                return;
            }
            db_item.Server     = item.Server;
            db_item.Time       = item.Time;
            db_item.Sender     = item.Sender;
            db_item.Recipients = item.Recipients;
            db_item.Email      = item.Email;
        }