public bool Delete(RolePermissionViewModel dt, int id)
        {
            RolePermission dr = db.RolePermissions.Where(i => i.rpID == id).FirstOrDefault();

            db.RolePermissions.Remove(dr);
            var Result = db.SaveChanges();

            return(Result == 1);
        }
        public bool Update(RolePermissionViewModel dt, int id)
        {
            RolePermission dr = db.RolePermissions.Where(i => i.rpID == id).FirstOrDefault();

            dr.rpID                    = dr.rpID;
            dr.rpPermissionName        = dr.rpPermissionName;
            dr.rpPermissionDescription = dr.rpPermissionDescription;
            var Result = db.SaveChanges();

            return(Result == 1);
        }
        public int Insert(RolePermissionViewModel dt)
        {
            RolePermission dr = new RolePermission();

            dr.rpPermissionName        = dr.rpPermissionName;
            dr.rpPermissionDescription = dr.rpPermissionDescription;
            db.RolePermissions.Add(dr);
            var Result = db.SaveChanges();

            return(dr.rpID);
        }