Example #1
0
        public bool SaveContact(Contact c)
        {
            SaveContactCommand sc = new SaveContactCommand(c);

            sc.Execute();
            return(sc.CommandResult.Result);
        }
Example #2
0
        public GenericResult UpdateContact(Guid id, [FromBody] ContactDetailsModel model)
        {
            var cmd = new SaveContactCommand(_orgService);

            model.Id = id;
            return(cmd.Save(model));
        }
Example #3
0
        public ContactControllerTest()
        {
            _saveContactCommand   = A.Fake <SaveContactCommand>();
            _contactsQuery        = A.Fake <ContactsQuery>();
            _deleteContactCommand = A.Fake <DeleteContactCommand>();

            _contactController = new ContactController(_contactsQuery, _saveContactCommand, _deleteContactCommand);
        }
Example #4
0
 public ContactController(ContactsQuery contactsQuery,
                          SaveContactCommand saveContactCommand,
                          DeleteContactCommand deleteContactCommand)
 {
     _contactsQuery        = contactsQuery;
     _saveContactCommand   = saveContactCommand;
     _deleteContactCommand = deleteContactCommand;
 }
Example #5
0
        public GenericResult SaveNewContact([FromBody] ContactDetailsModel model)
        {
            var cmd = new SaveContactCommand(_orgService);

            return(cmd.Save(model));
        }