Ejemplo n.º 1
0
        public async System.Threading.Tasks.Task <ActionResult> SaveContactAsync()
        {
            var contact = new Contact
            {
                Name        = "Tony",
                PhoneNumber = "5550000",
                Note        = "CEO"
            };

            var success = await ContactManagerRepositories.SaveContact(contact);

            if (success)
            {
                ViewBag.Message = "Contact has been saved.";
            }
            else
            {
                ViewBag.Message = "Contact has not been saved.";
            }

            return(View());
        }
Ejemplo n.º 2
0
        public static async Task <bool> Process(Contact contact)
        {
            // Process, Calculate, Format, etc.

            return(await ContactManagerRepositories.SaveContact(contact));
        }
Ejemplo n.º 3
0
 public static async Task <bool> ProcessorContact(ContactService cantactNew)
 {
     return(await ContactManagerRepositories.SaveContact(cantactNew));
 }