public async Task <IActionResult> Edit(int id, [Bind("DifferentMeterId,MeterName,ManufacturersNameandCountry,ManufacturesModelNo,TypeOfMeter,ClassOfAccuracy,SeparateAmeterforEachPhase,MeterTypeId")] LookUpDifferentMeter lookUpDifferentMeter)
        {
            if (id != lookUpDifferentMeter.DifferentMeterId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(lookUpDifferentMeter);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LookUpDifferentMeterExists(lookUpDifferentMeter.DifferentMeterId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MeterTypeId"] = new SelectList(_context.LookUpDifferentTypesOfMeter, "MeterTypeId", "MeterTypeName", lookUpDifferentMeter.MeterTypeId);
            return(View(lookUpDifferentMeter));
        }
        public async Task <IActionResult> Create([Bind("DifferentMeterId,MeterName,ManufacturersNameandCountry,ManufacturesModelNo,TypeOfMeter,ClassOfAccuracy,SeparateAmeterforEachPhase,MeterTypeId")] LookUpDifferentMeter lookUpDifferentMeter)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lookUpDifferentMeter);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MeterTypeId"] = new SelectList(_context.LookUpDifferentTypesOfMeter, "MeterTypeId", "MeterTypeName", lookUpDifferentMeter.MeterTypeId);
            return(View(lookUpDifferentMeter));
        }