Example #1
0
        public async Task <bool> AddContact(SA_Contact News)
        {
            //  News.CreatedDate = DateTime.Now;
            _context.SA_Contact.Add(News);
            int x = await _context.SaveChangesAsync();

            return(x == 0 ? false : true);
        }
 public ActionResult AddContact(SA_Contact model)
 {
     if (model.id == 0)
     {
         obj.AddContact(model);
     }
     return(View("Contact"));
 }