public void Update(Function function)
        {
            if (function == null)
            {
                throw new Exception("A função não pode ser nula");
            }

            if (string.IsNullOrEmpty(function.Name))
            {
                throw new Exception("A função precisa ter Name");
            }

            if (string.IsNullOrEmpty(function.Area))
            {
                throw new Exception("A função precisa ter área");
            }

            functionRepository.Edit(function);
        }