public async Task <IActionResult> Create(RadiusMasterCreateViewModel model)
        {
            if (ModelState.IsValid)
            {
                var store = new radiusmaster
                {
                    id = model.id
                    ,
                    name = model.name
                           //   , profilephoto=model.profilephoto
                    ,
                    isdeleted = false
                    ,
                    isactive = false
                };

                await _RadiusMasterServices.CreateAsync(store);

                TempData["success"] = "Record Saved successfully";
                return(RedirectToAction(nameof(Index)));
            }
            else
            {
                return(View());
            }
        }
Example #2
0
 //------
 public void Updatestatus(radiusmaster obj)
 {
     _context.radiusmaster.Update(obj);
     _context.SaveChanges();
 }
Example #3
0
        //public radiusmaster GetById(int id) =>
        //    _context.radiusmaster.Where(x => x.id == id).FirstOrDefault();

        public async Task UpdateAsync(radiusmaster obj)
        {
            _context.radiusmaster.Update(obj);
            await _context.SaveChangesAsync();
        }
Example #4
0
        public async Task CreateAsync(radiusmaster obj)
        {
            await _context.radiusmaster.AddAsync(obj);

            await _context.SaveChangesAsync();
        }