BL.Security.eliminar_rol C# (CSharp) Method

eliminar_rol() public method

public eliminar_rol ( long identity ) : void
identity long
return void
        public void eliminar_rol(long identity)
        {
            try
            {
                var rolQuery = from rol in entidad.roles
                               where rol.id == identity
                               select rol;

                DataAccess.role rolTMP = rolQuery.First();
                entidad.DeleteObject(rolTMP);
                entidad.SaveChanges();
            }
            catch (Exception e)
            {
                throw new Exception(e.ToString() + " --Security.cs / eliminar_rol()");
            }
        }