Example #1
0
        public async Task <ActionResult <bool> > Post(tbl_docter model)
        {
            try
            {
                await repository.Add(model);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #2
0
        public async Task <ActionResult <bool> > Put(int id, tbl_docter model)
        {
            if (id != model.Id)
            {
                return(BadRequest());
            }

            try
            {
                await repository.Update(model);

                return(true);
            }
            catch (DbUpdateConcurrencyException)
            {
                return(false);
            }
        }