public async Task <IActionResult> Edit(int id, [Bind("Name,IsDeleted,DeletedOn,Id,CreatedOn,ModifiedOn")] TypeOfProperty typeOfProperty)
        {
            if (id != typeOfProperty.Id)
            {
                return(this.NotFound());
            }

            if (this.ModelState.IsValid)
            {
                try
                {
                    this.typeOfPropertyRepository.Update(typeOfProperty);
                    await this.typeOfPropertyRepository.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!this.TypeOfPropertyExists(typeOfProperty.Id))
                    {
                        return(this.NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }

                return(this.RedirectToAction(nameof(this.Index)));
            }

            return(this.View(typeOfProperty));
        }
        public async Task <IActionResult> Create([Bind("Name,IsDeleted,DeletedOn,Id,CreatedOn,ModifiedOn")] TypeOfProperty typeOfProperty)
        {
            if (this.ModelState.IsValid)
            {
                await this.typeOfPropertyRepository.AddAsync(typeOfProperty);

                await this.typeOfPropertyRepository.SaveChangesAsync();

                return(this.RedirectToAction(nameof(this.Index)));
            }

            return(this.View(typeOfProperty));
        }