Exemplo n.º 1
0
        public void Create(CreateReminderModel model)
        {
            var item = new ReminderItem(
                Guid.NewGuid(),
                model.ContactId,
                model.Message,
                model.MessageDate);

            _storage.Create(item);
        }
Exemplo n.º 2
0
        private void OnMessageReceived(object sender, MessageReceivedEventArgs args)
        {
            var item = new ReminderItem(
                Guid.NewGuid(),
                args.ContactId,
                args.Message.Text,
                args.Message.Datetime);

            _storage.Create(item);
        }
        public void Create(CreateReminderModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("Пустой аргумент", nameof(model));
            }
            var item = new ReminderItem(
                Guid.NewGuid(),
                model.ContactId,
                model.Message,
                model.Datetime);

            _storage.Create(item);
        }