Example #1
0
        public async Task <ActionResult> Create(TelephoneNote telephoneNote)
        {
            try
            {
                await telephoneRepository.AddTelephoneNote(telephoneNote);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
Example #2
0
        public void Create([FromBody] TelephoneNote telephoneNote)
        {
            var x = Request;

            telephoneRepository.AddTelephoneNote(telephoneNote);
        }
 public void Add(TelephoneNote telephoneNote)
 {
     telephoneRepository.AddTelephoneNote(telephoneNote).GetAwaiter().GetResult();
 }